From: | Nolan Cafferky <Nolan(dot)Cafferky(at)rbsinteractive(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Cluster vs. non-cluster query planning |
Date: | 2006-05-01 21:08:01 |
Message-ID: | 445678B1.9050908@rbsinteractive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Tom Lane wrote:
>The first-order knob for tuning indexscan vs seqscan costing is
>random_page_cost. What have you got that set to?
>
>
This is currently at the default of 4. All of my other planner cost
constants are at default values as well. Dropping it to 1 drops the
estimated cost by a comparable ratio:
Index Scan using orders_status_btree_idx on orders o
(cost=1.20..3393.20 rows=7026 width=8) (actual time=0.050..0.314
rows=105 loops=1)
Index Cond: (order_statuses_id = $0)
InitPlan
-> Seq Scan on order_statuses (cost=0.00..1.20 rows=1 width=4)
(actual time=0.017..0.025 rows=1 loops=1)
Filter: ((id_name)::text = 'new'::text)
Total runtime: 0.498 ms
But, I'm guessing that random_page_cost = 1 is not a realistic value.
From | Date | Subject | |
---|---|---|---|
Next Message | Mikael Carneholm | 2006-05-01 21:33:58 | Re: Hardware: HP StorageWorks MSA 1500 |
Previous Message | Tom Lane | 2006-05-01 20:30:44 | Re: Cluster vs. non-cluster query planning |