Re: Query question

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Query question
Date: 2003-11-15 03:35:46
Message-ID: 3FB59F12.2090704@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dennis Bjorklund 2003-11-15 10:21:09 Re: Help with count(*)
Previous Message Slavisa Garic 2003-11-15 01:20:20 Re: INSERT extremely slow with large data sets (fwd)