Skip to content

Commit b60a851

Browse files
committed
Update count(*) discussion ideas:
< BY col {DESC} LIMIT 1. Completing this item involves making this > BY col {DESC} LIMIT 1. Completing this item involves doing this < invalidated if anyone modifies the table. < > invalidated if anyone modifies the table. Another idea is to > get a count directly from a unique index, but for this to be > faster than a sequential scan it must avoid access to the heap > to obtain tuple visibility information. > > * Allow data to be pulled directly from indexes > > Currently indexes do not have enough tuple tuple visibility > information to allow data to be pulled from the index without > also accessing the heap. One way to allow this is to set a bit > to index tuples to indicate if a tuple is currently visible to > all transactions when the first valid heap lookup happens. This > bit would have to be cleared when a heap tuple is expired. >
1 parent 5df3fc6 commit b60a851

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

doc/TODO

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
TODO list for PostgreSQL
33
========================
44
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
5-
Last updated: Wed Jan 19 09:17:41 EST 2005
5+
Last updated: Sat Jan 22 15:05:08 EST 2005
66

77
The most recent version of this document can be viewed at the PostgreSQL web
88
site, http://www.PostgreSQL.org.
@@ -246,7 +246,7 @@ Indexes
246246
* Use indexes for MIN() and MAX()
247247

248248
MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER
249-
BY col {DESC} LIMIT 1. Completing this item involves making this
249+
BY col {DESC} LIMIT 1. Completing this item involves doing this
250250
transformation automatically.
251251

252252
* Use index to restrict rows returned by multi-key index when used with
@@ -684,8 +684,20 @@ Cache
684684

685685
We could use a fixed row count and a +/- count to follow MVCC
686686
visibility rules, or a single cached value could be used and
687-
invalidated if anyone modifies the table.
688-
687+
invalidated if anyone modifies the table. Another idea is to
688+
get a count directly from a unique index, but for this to be
689+
faster than a sequential scan it must avoid access to the heap
690+
to obtain tuple visibility information.
691+
692+
* Allow data to be pulled directly from indexes
693+
694+
Currently indexes do not have enough tuple tuple visibility
695+
information to allow data to be pulled from the index without
696+
also accessing the heap. One way to allow this is to set a bit
697+
to index tuples to indicate if a tuple is currently visible to
698+
all transactions when the first valid heap lookup happens. This
699+
bit would have to be cleared when a heap tuple is expired.
700+
689701
* Consider automatic caching of queries at various levels:
690702
o Parsed query tree
691703
o Query execute plan

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy