Re: bitmap scan much slower than index scan, hash_search_with_hash_value
| От | Sergey Koposov |
|---|---|
| Тема | Re: bitmap scan much slower than index scan, hash_search_with_hash_value |
| Дата | |
| Msg-id | alpine.LRH.2.02.1209021700010.25232@calx046.ast.cam.ac.uk обсуждение исходный текст |
| Ответ на | Re: bitmap scan much slower than index scan, hash_search_with_hash_value (Peter Geoghegan <peter@2ndquadrant.com>) |
| Список | pgsql-hackers |
On Sun, 2 Sep 2012, Peter Geoghegan wrote: > On 2 September 2012 16:26, Sergey Koposov <koposov@ast.cam.ac.uk> wrote: > > That's why we support altering that value with an ALTER TABLE...ALTER > COLUMN DDL statement. You might at least consider increasing the > statistics target for the column first though, to see if that will > make the n_distinct value better accord with reality. Thanks, I've forgot about that possibility. After fixing the n_distinct to the correct value the index scan became the preferred option. and the row number estimate for the index scan became more realistic Sorry for the noise. Sergey ***************************************************** Sergey E. Koposov, PhD, Research Associate Institute of Astronomy, University of Cambridge Madingley road, CB3 0HA, Cambridge, UK Tel: +44-1223-337-551 Web: http://www.ast.cam.ac.uk/~koposov/
В списке pgsql-hackers по дате отправления: