Subject Re: [firebird-support] Re: ORDER BY on large VARCHAR columns
Author Ann W. Harrison
>
>--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
><aharrison@i...> wrote:
> >
> > How many records are you retrieving? Do you measure the time it
> > takes to retrieve all the records or only the time it takes to
> > retrieve the first? Do you normally retrieve all the records
> > you select or only the first few?
> >

At 11:09 AM 10/27/2004, robert_difalco wrote:

>It could be 2 or 3 hundred thousands. The table itself may have
>millions. Let's say a query could return 200,000 and we do a
>FIRST...SKIP query getting only 15 at a time. The page size is user
>configurable, but it defaults to 15 in each page. Btw, this is with
>1.0 on Solaris and 1.03 on Windows.

First...skip is about the worst thing you can possibly do,
since it evaluates the whole record set every time. Your
problem is not with the sort, per se, but with the time
required to retrieve 200,000 rows of which you want 15.

How often do you insert new data or update the long field on
existing records?

Regards,


Ann