Subject Re: [firebird-support] Re: Small Subsets of data
Author Lee Jenkins
Adam wrote:

> > >
> >
> > I'll try that. I'm using an OPF so I'll have to write a hard coded
> visitor in
> > the morning to do that. In the meantime, does the +0 negate the
> index somehow?
> Yes.
> s.SALE_NUMBER+0 is not an indexed expression, but obviously it is not
> going to effect the order. Firebird will not find a plan involving an
> ordered walk of the table. It will read the results in the order they
> are stored on disk, then sort them in memory.
> For 18 records, there is probably not much difference, but it takes
> longer for disk platters to jump around to random locations on disk
> than it does for arbitrarily ordered data in memory to be sorted.
> Adam

Wow. That was magnitudes faster, the dialog that displays the sales queried
displays almost immediately. The "Please Wait..." that shows while its loading
isn't even needed now.

Thanks a bunch, Adam.

Warm Regards,