Re: select max() much slower than select min() - Mailing list pgsql-performance

From Brian Cox
Subject Re: select max() much slower than select min()
Date
Msg-id 4A3BFDA0.5020308@ca.com
Whole thread Raw
In response to select max() much slower than select min()  (Brian Cox <brian.cox@ca.com>)
Responses Re: select max() much slower than select min()  (David Rees <drees76@gmail.com>)
List pgsql-performance
David Rees [drees76@gmail.com] wrote:
> Along those lines, couldn't you just have the DB do the work?
>
> select max(ts_id), min(ts_id) from ... where ts_interval_start_time >=
> ... and ...
>
> Then you don't have to transfer 500k ids across the network...
I guess you didn't read the entire thread: I started it because the
query you suggest took 15 mins to complete.

Brian


pgsql-performance by date:

Previous
From: David Rees
Date:
Subject: Re: select max() much slower than select min()
Next
From: David Rees
Date:
Subject: Re: select max() much slower than select min()