A Blob is a dynamically sizable datatype that has no specified size.
InterBase uses the segment length setting to determine the size of an internal buffer to which it writes Blob segment data.
My recommendation is to leave this value at max 512 undependent whether the expectable BLOB-size is 1K or 2MB.
For more information about Blob handling, see the Embedded SQL Guide.
wbr
Janos
Main Topics
Browse All Topics





by: kacorPosted on 2004-11-30 at 07:33:46ID: 12706775
From the IB handbooks:
Rather than storing BLOB data directly, a BLOB column stores a BLOB ID. A BLOB ID is a unique numeric value that references BLOB data. The BLOB data is stored elsewhere in the database, in a series of BLOB segments, which are units of BLOB data that are read and written in chunks. InterBase writes data to a BLOB one segment at a time. Similarly, it reads a BLOB one segment at a time.
The BLOB data referenced by the BLOB ID.
When a BLOB column is defined in a table, the BLOB definition can specify the expected size of BLOB segments that are written to the column. Actually, for SELECT, INSERT, and UPDATE operations, BLOB segments can be of varying length. For example, during insertion, a BLOB might be read in as three segments, the first segment having length 30, the second having length 300, and the third having length 3.
The default segment length is 80. Normally, an application should not attempt to write segments larger than the segment length defined in the table; doing so overflows the internal segment buffer, corrupting memory in the process.
It is very important:
The segment length setting does not affect InterBase system performance!!
Choose the segment length most convenient for the specific application. The largest possible segment length is 32 kilobytes (32,767 bytes) when using gpre.
But: in the examples the segment sizes are mostly between the default 80 and 512. My recommendation is to leave this value at max 512. Try it.
wbr Janos