Simon Riggs <[EMAIL PROTECTED]> writes: > You might want to consider the thought of "organised heaps" as an > alternative thought to index improvements. That way there is no heap to > avoid visiting because the index is also the main data structure. > This would offer performance, but would be one of the largest patches > seen in recent times. You may find some co-backers.
Either way it would be a pretty monstrous patch :-( ... in this case because of the amount of code that knows about the properties of heap storage, and in what David is thinking about because of the implications of trying to keep multiple copies of tuple state up-to-date. We'd probably end up with a cleaner system structure if we tried to create an API separating out the knowledge of heap structure, but the amount of work needed seems out of proportion to the benefit. It might be possible to compromise though. Imagine an index that contains only the upper levels of a search tree --- links to what would be the leaf level point into the associated heap. In this design the heap is still a heap in the sense that you can seqscan it without any awareness of the index structure. What you can't do is insert tuples or move them around without the index AM's say-so. RelationGetBufferForTuple would become an index AM call, but otherwise I think the impact on existing code wouldn't be large. There are some limitations. For instance I don't think that the index AM could control the order of items within a heap page, because of the need for TIDs to be persistent; so within-page searches would still be kinda slow. But it's interesting to think about. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly