Re: Cluster vs. non-cluster query planning - Mailing list pgsql-performance

From Nolan Cafferky
Subject Re: Cluster vs. non-cluster query planning
Date
Msg-id 445678B1.9050908@rbsinteractive.com
Whole thread Raw
In response to Re: Cluster vs. non-cluster query planning  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Cluster vs. non-cluster query planning
List 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.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cluster vs. non-cluster query planning
Next
From: "Mikael Carneholm"
Date:
Subject: Re: Hardware: HP StorageWorks MSA 1500