Re: select max() much slower than select min()

From: Brian Cox <brian(dot)cox(at)ca(dot)com>
To: "David Rees [drees76(at)gmail(dot)com]" <drees76(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: select max() much slower than select min()
Date: 2009-06-19 21:05:36
Message-ID: 4A3BFDA0.5020308@ca.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David Rees [drees76(at)gmail(dot)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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Rees 2009-06-19 23:39:23 Re: select max() much slower than select min()
Previous Message David Rees 2009-06-19 20:41:39 Re: select max() much slower than select min()