Re: Query question - Mailing list pgsql-performance

From Christopher Kings-Lynne
Subject Re: Query question
Date
Msg-id 3FB59F12.2090704@familyhealth.com.au
Whole thread Raw
In response to Re: Query question  (Neil Conway <neilc@samurai.com>)
List pgsql-performance
>>The only thing you're adding to the query is a second SORT step, so it
>>shouldn't require any more time/memory than the query's first SORT
>>did.
>
>
> Interesting -- I wonder if it would be possible for the optimizer to
> detect this and avoid the redundant inner sort ... (/me muses to
> himself)

That's somethign I've wondered myself as well.  Also - I wonder if the
optimiser could be made smart enough to push down the outer LIMIT and
OFFSET clauses into the subquery.

Chris



pgsql-performance by date:

Previous
From: Slavisa Garic
Date:
Subject: Re: INSERT extremely slow with large data sets (fwd)
Next
From: Dennis Bjorklund
Date:
Subject: Re: Help with count(*)