Subject Re: Fetch performance question.
Author Adam
--- In firebird-support@yahoogroups.com, Mitch Peek <mitchp@...>
wrote:
>
> FB 1.5.2 SuperServer
>
> Hope I am on track with what I am observing here.
>
> I have a stored procedure and the result is used to produce a
report.
>
> The procedure executes typically in the 3 - 4 second range.
However,
> the fetch takes considerably longer. For instance, the procedure
> currently produces 1553 rows of data.
>
> I have eleimanted the network (for testing) the DB is local,
although i
> am connecting using 127.0.0.1:DBAlias not sure this important,
but...
>
> The fetchall actually can take several minutes to complete. The
best
> performance I have seen is about 2.5 minutes to fetch these 1500
rows.
> the row itself isn't wide, no blobs, 7 numerics, 2 integers, and 4
> varchar(50).
>
> Any Ideas?

It seems way too slow - only 10 a second. The only time I have seen
this sort of performance hit is where a virus scanner has got itself
a bit excited analysing each packet that goes through the network
card.

What is the procedure doing inside?

Are you ordering by an indexed field? If so try the +0 in the order
by clause field you are ordering by. An indexed sort is great for
selecting the first few records, but significantly slower. Even so,
there must be either a lot of natural reads or some external factors
going on here.

Adam