Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0915d37

Browse files
committed
Remove mention of MIN/MAX() not using indexes.
1 parenteb8f9cc commit0915d37

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

‎doc/FAQ

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated:Sun Feb12 12:15:49 EST 2006
4+
Last updated:Fri Feb24 09:59:35 EST 2006
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -569,14 +569,8 @@
569569
sequential scan followed by an explicit sort is usually faster than an
570570
index scan of a large table.
571571
However, LIMIT combined with ORDER BY often will use an index because
572-
only a small portion of the table is returned. In fact, though MAX()
573-
and MIN() don't use indexes, it is possible to retrieve such values
574-
using an index with ORDER BY and LIMIT:
575-
SELECT col
576-
FROM tab
577-
ORDER BY col [ DESC ]
578-
LIMIT 1;
579-
572+
only a small portion of the table is returned.
573+
580574
If you believe the optimizer is incorrect in choosing a sequential
581575
scan, use SET enable_seqscan TO 'off' and run query again to see if an
582576
index scan is indeed faster.

‎doc/src/FAQ/FAQ.html

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
alink="#0000ff">
1111
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1212

13-
<P>Last updated:Sun Feb12 12:15:49 EST 2006</P>
13+
<P>Last updated:Fri Feb24 09:59:35 EST 2006</P>
1414

1515
<P>Current maintainer: Bruce Momjian (<Ahref=
1616
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)
@@ -742,16 +742,8 @@ <H3 id="item4.6">4.6) Why are my queries slow? Why don't they
742742
usually faster than an index scan of a large table.</P>
743743
However,<SMALL>LIMIT</SMALL> combined with<SMALL>ORDER BY</SMALL>
744744
often will use an index because only a small portion of the table
745-
is returned. In fact, though MAX() and MIN() don't use indexes,
746-
it is possible to retrieve such values using an index with ORDER BY
747-
and LIMIT:
748-
<PRE>
749-
SELECT col
750-
FROM tab
751-
ORDER BY col [ DESC ]
752-
LIMIT 1;
753-
</PRE>
754-
745+
is returned.</P>
746+
755747
<P>If you believe the optimizer is incorrect in choosing a
756748
sequential scan, use<CODE>SET enable_seqscan TO 'off'</CODE> and
757749
run query again to see if an index scan is indeed faster.</P>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp