Re: Page access pattern in query plan using index scan
От | Jack Orenstein |
---|---|
Тема | Re: Page access pattern in query plan using index scan |
Дата | |
Msg-id | 40BF1765.2040304@geophile.com обсуждение исходный текст |
Ответ на | Re: Page access pattern in query plan using index scan (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: Page access pattern in query plan using index scan
|
Список | pgsql-general |
Greg Stark wrote: >>Can you recommend an application-level workaround that will access pages >>in the right order? > > > Well you could try CLUSTER-ing your table on that index. For my application, the problem with CLUSTER is that it reclusters the entire table. So as the table grows, the cost of CLUSTER goes up. What would be really nice is something like "cluster recent". The idea is to cluster only rows added since the last cluster. This amortizes the time and storage costs of clustering across the invocations of cluster in a much more palatable way. If such a command were used this wisely, (e.g. whenever the table grows by 20%) then I suspect applications would obtain most of the benefit of a sort following an index lookup. (And I'm guessing this is a much simpler development task.) Admittedly, this would not work so well in cases where the index keys change in value. But this would be a huge win in situations (like mine) where the keys never change. Jack Orenstein
В списке pgsql-general по дате отправления: