Re: Re: Loading optimization
От | Tom Lane |
---|---|
Тема | Re: Re: Loading optimization |
Дата | |
Msg-id | 1651.979063185@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Re: Loading optimization (Martijn van Oosterhout <kleptog@cupid.suninternet.com>) |
Список | pgsql-general |
Martijn van Oosterhout <kleptog@cupid.suninternet.com> writes: > But does postgres actually use the fact that the data is clustered? The planner has no idea that the table is clustered, and will estimate indexscan costs on the assumption that the data is randomly ordered in the table. So you're likely to get a seqscan plan for queries where indexscan would actually be faster. This is something we need to fix, but the main problem is accounting for the fact that the clustered order will degrade over time as data is added/updated. See past discussions in pghackers. The CLUSTER implementation is so shoddy at the moment that I'm hesitant to encourage people to use it anyway :-(. We've got to rewrite it so that it doesn't drop other indexes, lose constraints, break foreign key and inheritance relationships, etc etc. regards, tom lane
В списке pgsql-general по дате отправления: