Subject Re: [firebird-support] Re: Stumped on SQL Indexing/Bad Plan-ing
Author Thomas Steinmaurer
> Just to close off this case, the final SQL that SET was looking at is "slow-ish" because it has to make at least 2 hits to the DB (maybe even 4?) because at least 2 of the fields are BLOB SUB_TYPE 1 fields, which I have learned require multiple hits to the DB. Without those fields included in the field list, the query is< 1s.
> I need to include those fields and the slower response time is tolerable if I explain it to my customer.

There are two factors here:

1) If the BLOB is small to fit onto the same data page beside other data
of the record, then BLOB data is transfered as any other field data to
the client.

2) If the BLOB is too large for the data page, then a pointer to another
page is stored in the field. It then depends on your access components
if it is loaded automatically, even if the user isn't interested in, or
you could delay that e.g. the user needs to click a button a load the
BLOB data

With regards,

Thomas Steinmaurer
Upscene Productions

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!