From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sean Leach <sleach@wiggum.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Weird issue with planner choosing seq scan
Date: Sun, 24 Feb 2008 12:50:31 -0500
Message-ID: <5289.1203875431@sss.pgh.pa.us> (raw)
In-Reply-To: <F836C829-D69F-4FA3-966C-002E715BF26F@wiggum.com>
References: <F836C829-D69F-4FA3-966C-002E715BF26F@wiggum.com>
Sean Leach <sleach@wiggum.com> writes:
> I have a table, that in production, currently has a little over 3
> million records in production. In development, the same table has
> about 10 million records (we have cleaned production a few weeks
> ago).
You mean the other way around, to judge by the rowcounts from EXPLAIN.
> -> Index Scan using u_counts_i2 on u_counts c
> (cost=0.00..53.53 rows=1082 width=4) (actual time=0.277..1224.582
> rows=392173 loops=1)
I kinda think the devel system wouldn't be using an indexscan either
if it had up-to-date ANALYZE statistics. But even with the 1082 row
estimate that seems a remarkably low cost estimate. Have you been
playing games with random_page_cost? Maybe you forgot to duplicate the
devel system's cost parameters onto the production system?
regards, tom lane
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: tgl@sss.pgh.pa.us, sleach@wiggum.com
Subject: Re: Weird issue with planner choosing seq scan
In-Reply-To: <5289.1203875431@sss.pgh.pa.us>
* 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