Re: 8.1 count(*) distinct: IndexScan/SeqScan

From: Pailloncy Jean-Gerard <jg(at)rilk(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: 8.1 count(*) distinct: IndexScan/SeqScan
Date: 2005-11-24 11:54:50
Message-ID: 7F8AA93A-431E-44E9-9339-F4BDA5FD7760@rilk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Pailloncy Jean-Gerard <jg(at)rilk(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Vipul.Gupta 2005-11-24 12:24:32 xlog flush request error
Previous Message Pailloncy Jean-Gerard 2005-11-24 11:54:25 Re: 8.1 count(*) distinct: IndexScan/SeqScan