File table contains - File_Id and File_data(BLOB)
how can I know the size of the binary file stored in File_data column. length
function gives the length of file but how to know the size in KB.
Run the SQL query Name your SQL query in the properties pane on the right. Publish your SQL query by pressing CTRL+S or selecting the Publish all button. Select the Run button to execute the SQL query. The blob count and total size per container are reported in the Results pane.
BLOB: Can handle up to 65,535 bytes of data. MEDIUMBLOB: The maximum length supported is 16,777,215 bytes. LONGBLOB: Stores up to 4,294,967,295 bytes of data.
The sum of each column's length is the record length , which is the length of data that is physically stored in the table. You can retrieve the value of the AVGROWLEN column in the SYSIBM. SYSTABLES catalog table to determine the average length of rows within a table.
BLOB : Variable-length binary large object string that can be up to 2GB (2,147,483,647) long. Primarily intended to hold non-traditional data, such as voice or mixed media. BLOB strings are not associated with a character set, as with FOR BIT DATA strings.
This gives a number in bytes, devide it by 1024 to get size in KB.
Select sum(BIGINT(length(blob_column)))
from table;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With