Re: 8.1 count(*) distinct: IndexScan/SeqScan - Mailing list pgsql-performance

From Pailloncy Jean-Gerard
Subject Re: 8.1 count(*) distinct: IndexScan/SeqScan
Date
Msg-id 7F8AA93A-431E-44E9-9339-F4BDA5FD7760@rilk.com
Whole thread Raw
In response to Re: 8.1 count(*) distinct: IndexScan/SeqScan  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Pailloncy Jean-Gerard
Date:
Subject: Re: 8.1 count(*) distinct: IndexScan/SeqScan
Next
From: Vipul.Gupta@trilogy.com
Date:
Subject: xlog flush request error