Blob segment size

107 views
Skip to first unread message

Ertan Küçükoglu

unread,
Dec 26, 2020, 4:08:07 AM12/26/20
to firebird...@googlegroups.com
Hello,

We are using FirebirdSQL 2.5.9.latest.

My colleague insisted on performance gain on BLOB columns if it is defined with a segment size like

ALTER TABLE DETAILS ADD RESULTCALC BLOB SUB_TYPE TEXT SEGMENT SIZE 4096

I do not know the internals of FirebirdSQL. I tried to find some information on segment size and here ( https://www.ibexpert.net/ibe/pmwiki.php?n=Doc.DefinitionBlob#SegmentSize ) it is indicated in a sentence that "this value can in effect be ignored on modern powerful computers" Which does not define what is a "powerful computer".

Our BLOB size differs. There are 6KiB and there are more than 60KiB. They are mostly not at 100KiB level though. However, there are 5 BLOB columns in a single and most heavily used table. Moreover, that table is frequently queried with several other tables with 3-5 BLOB columns in them.

I wonder;
- if explanations on that shared link above are correct.
- if setting segment size to max 65535 will be of any help to gain any performance at all.

Thanks & Regards,
Ertan Küçükoğlu

Mark Rotteveel

unread,
Dec 26, 2020, 4:56:49 AM12/26/20
to firebird...@googlegroups.com
Segment size is a holdover from ESQL, and is - AFAIK - information for
the client, not the server, it should be effectively ignored in most
situations. When using stream blobs there are no segments, and when
using segmented blobs, the effective segment size is determined by the
client, not the server.

So, again AFAIK, unless you're using a client that actually reads the
segment size from the metadata tables and uses it to size the segments
it writes to the database, it will have no effect whatsoever.

Mark
--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages