Re: CLUSTER and clustered indices
От | Alvaro Herrera |
---|---|
Тема | Re: CLUSTER and clustered indices |
Дата | |
Msg-id | 20051117154548.GA7658@surnet.cl обсуждение исходный текст |
Ответ на | CLUSTER and clustered indices (Simon Riggs <simon@2ndquadrant.com>) |
Список | pgsql-hackers |
Simon Riggs wrote: > When a table has been CLUSTERed on a particular index AND that index > values is monotonically increasing, then it would be a bad move to use > blocks from the FSM since this would tend to destroy the natural > clustering sequence. > > The index values will be monotonically increasing if a datatype is > defined as SERIAL or if the default value is defined as the nextval of a > sequence. > > Does anybody think it would be a good idea to not use the FSM if > - we have a CLUSTER defined on an index > - for the indexed column we have default value set of nextval() That's a nice idea, but what's the cost? You will have to check every insert: does the table has indexes? Is any of them clustered? Is the clustered index attached to a sequence? It seems quite an expensive check to be making. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-hackers по дате отправления: