Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0915d370
Commit
0915d370
authored
Feb 24, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mention of MIN/MAX() not using indexes.
parent
eb8f9cc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
20 deletions
+6
-20
doc/FAQ
doc/FAQ
+3
-9
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+3
-11
No files found.
doc/FAQ
View file @
0915d370
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.
...
...
doc/src/FAQ/FAQ.html
View file @
0915d370
...
...
@@ -10,7 +10,7 @@
alink=
"#0000ff"
>
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated:
Sun Feb 12 12:15:49
EST 2006
</P>
<P>
Last updated:
Fri Feb 24 09:59:35
EST 2006
</P>
<P>
Current maintainer: Bruce Momjian (
<A
href=
"mailto:pgman@candle.pha.pa.us"
>
pgman@candle.pha.pa.us
</A>
)
...
...
@@ -742,16 +742,8 @@ table?</TD><TD>unlimited</TD></TR>
usually faster than an index scan of a large table.
</P>
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. 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 [ DESC ]
LIMIT 1;
</PRE>
is returned.
</P>
<P>
If you believe the optimizer is incorrect in choosing a
sequential scan, use
<CODE>
SET enable_seqscan TO 'off'
</CODE>
and
run query again to see if an index scan is indeed faster.
</P>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment