Subject | Re: [firebird-support] Blob size |
---|---|
Author | Ann W. Harrison |
Post date | 2004-01-17T17:41:16Z |
Uwe Oeder wrote:
longest single byte stream you can send in a single call is 64KB.
However, you can send an arbitrary number of segments, each in its
own call, all stored in the same blob.
space is allocated for the blob and its header - about 16 bytes of
information about the blob that is stored with it.
record headers, plus eight bytes each for the blob pointer in
the record, plus another four bytes of page index for each blob.
Blobs are not very practical for data that's going to be
as small as 20 bytes - unless some instances are 20 bytes and others
200 or 2000.
from the record and a page index entry.
Regards,
Ann
www.ibphoenix.com
We have answers.
>Question 1. So the maximum size of a blob field is 64KB ?As Helen said, the segment size limit is 64KB, which means that the
longest single byte stream you can send in a single call is 64KB.
However, you can send an arbitrary number of segments, each in its
own call, all stored in the same blob.
>Question 2. Does that mean that anytime you put something into a BLOB fieldNo. Nothing is allocated until you send something in, then enough
>64 KB are allocated for it ?
space is allocated for the blob and its header - about 16 bytes of
information about the blob that is stored with it.
>Question 3. If for instance I would save in one record's BLOB field 100 bytesThey would occupy 120 bytes for data, plus 16 bytes each for
>and in another BLOB field 20 bytes that together they only occupy 120 bytes ?
record headers, plus eight bytes each for the blob pointer in
the record, plus another four bytes of page index for each blob.
Blobs are not very practical for data that's going to be
as small as 20 bytes - unless some instances are 20 bytes and others
200 or 2000.
>Question 4. Is there anyway to save only the actual amount of bytes usedAs above, you've got to have a header block and a pointer
>and no more ?
from the record and a page index entry.
Regards,
Ann
www.ibphoenix.com
We have answers.