Subject Re: [Firebird-Java] jaybid vs postresqlj_dbc
Author Roman Rokytskyy
Hi Marcin,

> jaybird: 30 seconds
>
> postgre 2 seconds
>
> What is going on ?

Thanks for sending me an example. The reason for this performance issue is
the BLOB column. Fetching contents of BLOB column means minimum 3 roundtrips
to the server: open, get segment, close. "get segment" can be executed
multiple times. With BLOB column included I get ~6 seconds for fetching
24,000 records on my laptop, without it I get ~0,3 seconds.

> What im doing wrong ?

Nothing. This is Firebird issue, there is no clean solution to it. Currently
Firebird team plans to re-design the wire protocol (and possibly the API),
but this won't happen soon.

The only solution to your case is replacing your BLOB column with large
enough VARCHAR column. Note, the largest VARCHAR can be almost 32k big, for
text content that means approx. 32 pages of text - that is a lot of
information. Just be aware that total size of the record cannot be bigger
than 64k.

Roman