diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-02-24 15:00:48 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-02-24 15:00:48 +0000 |
commit | 032858216caa0e820ddfe32ec4cd91a2de31a6b4 (patch) | |
tree | 24279e57214641e6c0e1d2f95016ffb290bca3f6 /doc/FAQ | |
parent | 39825338b4de141a300850f3211141dbb7729118 (diff) |
Backpatch FAQ changes to 8.1.X.
Diffstat (limited to 'doc/FAQ')
-rw-r--r-- | doc/FAQ | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL - Last updated: Sun Feb 12 12:15:49 EST 2006 + Last updated: Fri Feb 24 09:59:35 EST 2006 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) @@ -569,14 +569,8 @@ sequential scan followed by an explicit sort is usually faster than an index scan of a large table. However, LIMIT combined with ORDER BY often will use an index because - only a small portion of the table 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: - SELECT col - FROM tab - ORDER BY col [ DESC ] - LIMIT 1; - + only a small portion of the table is returned. + If you believe the optimizer is incorrect in choosing a sequential scan, use SET enable_seqscan TO 'off' and run query again to see if an index scan is indeed faster. |