From: Nolan Cafferky <Nolan.Cafferky@rbsinteractive.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Cluster vs. non-cluster query planning
Date: Mon, 01 May 2006 14:08:01 -0700
Message-ID: <445678B1.9050908@rbsinteractive.com> (raw)
In-Reply-To: <8044.1146515444@sss.pgh.pa.us>
References: <445644F9.2020708@rbsinteractive.com>
<44566612.8020709@rbsinteractive.com>
<8044.1146515444@sss.pgh.pa.us>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Nolan.Cafferky@rbsinteractive.com, tgl@sss.pgh.pa.us
Subject: Re: Cluster vs. non-cluster query planning
In-Reply-To: <445678B1.9050908@rbsinteractive.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox