Re: Need help in setting optimal configuration for a huge - Mailing list pgsql-performance

From Tomasz Rybak
Subject Re: Need help in setting optimal configuration for a huge
Date
Msg-id 1130087877.6708.16.camel@localhost.localdomain
Whole thread Raw
In response to Re: Need help in setting optimal configuration for a huge  ("Craig A. James" <cjames@modgraph-usa.com>)
List pgsql-performance
Dnia 23-10-2005, nie o godzinie 09:31 -0700, Craig A. James napisał(a):
<cut>
> MIN() and MAX() -- These are surprisingly slow, because they seem to do a full table scan EVEN ON AN INDEXED COLUMN!
In 8.1 this is no true, see the changelog.

> I don't understand why, but happily there is an effective substitute:
>
>    select mycolumn from mytable order by mycolumn limit 1;  -- same as MIN()
>
>    select mycolumn from mytable order by mycolumn desc limit 1;  -- same as MAX()

In 8.1 these queries are equivalent:

select mycolumn from mytable order by mycolumn limit 1;
select min(mycolumn) from mytable;

--
Tomasz Rybak <bogomips@post.pl>


pgsql-performance by date:

Previous
From: "Steinar H. Gunderson"
Date:
Subject: Re: Need help in setting optimal configuration for a huge
Next
From: Tom Lane
Date:
Subject: Re: Need help in setting optimal configuration for a huge