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

From: Palle Girgensohn <girgen(at)pingpong(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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:25:08
Message-ID: 16563C7D831BD7B32DFBDDEC@rambutan.pingpong.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

--On torsdag, november 01, 2007 11.06.57 -0400 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?

alter table login alter userid SET statistics 1000;
vacuum analyze login;

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2007-11-01 15:28:53 Re: select max(field) from table much faster with a group by clause?
Previous Message Tom Lane 2007-11-01 15:06:57 Re: select max(field) from table much faster with a group by clause?