1) Someone at O'Reilly suggested that we order our duplicate index
entries by tid so if we are hitting the heap for lots of duplicates, the
hits will be on sequential pages. Seems like a nice idea.
2) After Tatsuo's report of running 1000 backends on pgbench and from a
Solaris report, I think we should have a queue of backends waiting for a
spinlock, rather than having them sleep and try again. This is
particularly important for multi-processor machines.
3) I am reading the Solaris Internals book and there is mention of a
"free behind" capability with large sequential scans. When a large
sequential scan happens that would wipe out all the old cache entries,
the kernel detects this and places its previous pages first on the free
list. For out code, if we do a sequential scan of a table that is
larger than our buffer cache size, I think we should detect this and do
the same. See http://techdocs.postgresql.org for my performance paper
for an example.
New TODO entries are:
* Order duplicate index entries by tid
* Add queue of backends waiting for spinlock
* Add free-behind capability for large sequential scans
I will modify them with any comments people have.
Bruce Momjian | http://candle.pha.pa.us
firstname.lastname@example.org | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026