Re: select max(field) from table much faster with a group by clause?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Palle Girgensohn" <girgen(at)pingpong(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: select max(field) from table much faster with a group by clause?
Date: 2007-11-01 15:28:53
Message-ID: dcc563d10711010828t6802a8av9235cc8c70568089@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 11/1/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Palle Girgensohn <girgen(at)pingpong(dot)net> writes:
> > Unfortunately, altering statistics doesn't help. I see no difference when
> > altering the value from 10 (default) to 100, 1000 or 100000. :-(
>
> Um, you did re-ANALYZE the table after changing the setting?

And he changed it with

ALTER TABLE name ALTER [ COLUMN ] column SET STORAGE { PLAIN |
EXTERNAL | EXTENDED | MAIN }

right?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-11-01 15:34:42 Re: select max(field) from table much faster with a group by clause?
Previous Message Palle Girgensohn 2007-11-01 15:25:08 Re: select max(field) from table much faster with a group by clause?