Re: 8.1 count(*) distinct: IndexScan/SeqScan
От | Pailloncy Jean-Gerard |
---|---|
Тема | Re: 8.1 count(*) distinct: IndexScan/SeqScan |
Дата | |
Msg-id | 7F8AA93A-431E-44E9-9339-F4BDA5FD7760@rilk.com обсуждение исходный текст |
Ответ на | Re: 8.1 count(*) distinct: IndexScan/SeqScan (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
> Pailloncy Jean-Gerard <jg@rilk.com> writes: >> Why the stupid indexscan plan on the whole table ? > > Pray tell, what are you using for the planner cost parameters? > The only way I can come close to duplicating your numbers is > by setting random_page_cost to somewhere around 0.01 ... > I did not change the costs. > grep cost postgresql.conf # note: increasing max_connections costs ~400 bytes of shared memory per # note: increasing max_prepared_transactions costs ~600 bytes of shared memory #vacuum_cost_delay = 0 # 0-1000 milliseconds #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits #vacuum_cost_limit = 200 # 0-10000 credits #random_page_cost = 4 # units are one sequential page fetch # cost #cpu_tuple_cost = 0.01 # (same) #cpu_index_tuple_cost = 0.001 # (same) #cpu_operator_cost = 0.0025 # (same) #autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for # vacuum_cost_delay #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for # vacuum_cost_limit Cordialement, Jean-Gérard Pailloncy
В списке pgsql-performance по дате отправления: