Subject | Slow Select with ORDER BY when large VARCHAR present |
---|---|
Author | robert_difalco |
Post date | 2003-04-04T18:09:44Z |
In firebird, is there a paging size to improve the performance of
queries that contain large (i.e. 1024) VARCHARs when an ORDER BY
clause is present?
Consider the following:
SELECT integerFoo, varchar1024 FROM test;
This is very fast. But this is much slower:
SELECT integerFoo, varchar1024 FROM test ORDER BY integerFoo;
Where or not there are indices makes no impact on speed. I'm
assuming that Firebird has to shuffle buffers around for the large
varchar field when doing an ORDER BY. So, I'm wonder if there are
any config parameters that could increase the performance of this
kind of query.
TIA,
R.
queries that contain large (i.e. 1024) VARCHARs when an ORDER BY
clause is present?
Consider the following:
SELECT integerFoo, varchar1024 FROM test;
This is very fast. But this is much slower:
SELECT integerFoo, varchar1024 FROM test ORDER BY integerFoo;
Where or not there are indices makes no impact on speed. I'm
assuming that Firebird has to shuffle buffers around for the large
varchar field when doing an ORDER BY. So, I'm wonder if there are
any config parameters that could increase the performance of this
kind of query.
TIA,
R.