Re: optimize query with a maximum(date) extraction - Mailing list pgsql-performance

From Tom Lane
Subject Re: optimize query with a maximum(date) extraction
Date
Msg-id 13389.1189005818@sss.pgh.pa.us
Whole thread Raw
In response to Re: optimize query with a maximum(date) extraction  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-performance
Gregory Stark <stark@enterprisedb.com> writes:
> You can simulate such a plan with the subqueries I described but
> there's a bit more overhead than necessary and you need a reasonably
> efficient source of the distinct ids.

Yeah, that seems like the $64 question.  If you have no better way of
finding out the set of ID values than a seqscan, then there's no point
in trying to optimize the min/max accumulation ...

            regards, tom lane

pgsql-performance by date:

Previous
From: "Carlo Stonebanks"
Date:
Subject: Re: Performance on 8CPU's and 32GB of RAM
Next
From: "Scott Marlowe"
Date:
Subject: Re: Performance on 8CPU's and 32GB of RAM