Yes, fetching a RID list from an index scan, sorting 'em and then fetching from the table would be a very appreciable speedup for many queries. I would imagine that all the commercial engines do this (db2 calls it a sorted RID-list-fetch) .. and this has in fact been discussed on -hackers before.
One issue for this is that there could be a slip between the cup and the lip .. ie., between the fetch from the index, the sort, and the fetch from the table a vaccuum could have taken place rendering TIDs invalid. This should however not be a show-stopper .. surely all that's needed is a lock against vaccuuming in the presence of a tid-list-fetch. -- Pip-pip Sailesh http://www.cs.berkeley.edu/~sailesh ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html