Re: A fairly obvious optimization? - Mailing list pgsql-hackers

From cbbrowne@cbbrowne.com
Subject Re: A fairly obvious optimization?
Date
Msg-id 20020624180348.6208833138@cbbrowne.com
Whole thread Raw
In response to Re: A fairly obvious optimization?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sun, 23 Jun 2002 17:16:09 EDT, the world broke into rejoicing as
Bruce Momjian <pgman@candle.pha.pa.us>  said:
> FAQ updated in section 4.8: My queries are slow or don't make use of the
> indexes. Why?
> 
>     is returned.  In fact, though MAX() and MIN() don't use indexes,   
>     it is possible to retrieve such values using an index with ORDER BY
>     and LIMIT:
> <PRE>
>     SELECT col
>     FROM tab
>     ORDER BY col
>     LIMIT 1
> </PRE>

This sounds like the sort of thing that would be really nice to be able
to automate into the query optimizer...
--
(reverse (concatenate 'string "moc.enworbbc@" "sirhc"))
http://www3.sympatico.ca/cbbrowne/spreadsheets.html
"I decry the current  tendency to seek  patents on algorithms.   There
are better ways to  earn a living  than to  prevent other  people from
making use of one's contributions to computer science."
-- D. E. Knuth




pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Use of LOCAL in SET command
Next
From: Daniel Kalchev
Date:
Subject: oids rollover?