Subject | Re: [firebird-support] Re: Slow query (unindexed reads) |
---|---|
Author | Ann Harrison |
Post date | 2011-06-22T20:18:32Z |
On Wed, Jun 22, 2011 at 8:41 AM, kerryneighbour <kerry@...> wrote:
but not in Firebird unless you include a FIRST clause to restrict the
number of rows returned.
If you actually have to read all the rows in a table, the fastest way
to do it is to read them in storage order so you're not bouncing
around from page to page. Maybe you need to show us the real query.
Good luck,
Ann
>In some databases, ORDER BY will cause the optimizer to use an index,
> I do not care about the ORDER BY - I don't care about the order the records are processed in. I simply use it to try and force the use of an index. It did not work in this case, but I seem to recall it working in other cases.
>
but not in Firebird unless you include a FIRST clause to restrict the
number of rows returned.
If you actually have to read all the rows in a table, the fastest way
to do it is to read them in storage order so you're not bouncing
around from page to page. Maybe you need to show us the real query.
Good luck,
Ann