Frequently Asked Questions (FAQ) for PostgreSQL
- Last updated: Thu Apr 13 08:14:25 EDT 2006
+ Last updated: Thu Apr 13 08:20:04 EDT 2006
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
Indexes are normally not used for ORDER BY or to perform joins. A
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.
+ 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.
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
alink="#0000ff">
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
- <P>Last updated: Thu Apr 13 08:14:25 EDT 2006</P>
+ <P>Last updated: Thu Apr 13 08:20:04 EDT 2006</P>
<P>Current maintainer: Bruce Momjian (<A href=
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)
<LI> <A href="http://www.intermedia.net/support/sql/sqltut.shtm">http://www.intermedia.net/support/sql/sqltut.shtm</A>
</LI>
<LI>
- <A href="http://sqlcourse.com/">http://sqlcourse.com</A></P>
+ <A href="http://sqlcourse.com/">http://sqlcourse.com</A>
</LI>
<LI>
<A href="http://www.w3schools.com/sql/default.asp">http://www.w3schools.com/sql/default.asp</A>
<P>Indexes are normally not used for <SMALL>ORDER BY</SMALL> or to
perform joins. A sequential scan followed by an explicit sort is
- usually faster than an index scan of a large table.</P>
+ usually faster than an index scan of a large table.
However, <SMALL>LIMIT</SMALL> combined with <SMALL>ORDER BY</SMALL>
often will use an index because only a small portion of the table
is returned.</P>