Re: benchmarking the query planner
От | Greg Stark |
---|---|
Тема | Re: benchmarking the query planner |
Дата | |
Msg-id | 4136ffa0812120650g401f9e44u328a5f427aec1a0d@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: benchmarking the query planner (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: benchmarking the query planner
|
Список | pgsql-hackers |
On Fri, Dec 12, 2008 at 2:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > AFAICS, marginal enlargements in the sample size aren't going to help > much for ndistinct --- you really need to look at most or all of the > table to be guaranteed anything about that. Well you only need to maintain a fixed percentage of the table if by "guaranteed anything" you mean guaranteed a consistent level of confidence. But even a small percentage like 1% means a very different behaviour than currently. For large tables it could mean sampling a *lot* more. However if by "guaranteed anything" you mean guaranteeing an actual useful result then it's true. Even samples as large as 50% give a pretty low confidence estimate. > But having said that, I have wondered whether we should consider > allowing the sample to grow to fill maintenance_work_mem Hm, so I wonder what this does to the time analyze takes. I think it would be the only thing where raising maintenance_work_mem would actually increase the amount of time an operation takes. Generally people raise it to speed up index builds and vacuums etc. -- greg
В списке pgsql-hackers по дате отправления: