From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christo Du Preez <christo@mecola.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: test / live environment, major performance difference
Date: Tue, 12 Jun 2007 12:09:46 -0400
Message-ID: <8385.1181664586@sss.pgh.pa.us> (raw)
In-Reply-To: <466EA078.20601@mecola.com>
References: <466EA078.20601@mecola.com>
Christo Du Preez <christo@mecola.com> writes:
> On my laptop the explain analyze looks like this:
> "Index Scan using fki_layertype_parentid on layertype (cost=0.00..8.27
> rows=1 width=109)"
> " Index Cond: (parentid = 300)"
OK ...
> and on the problem server:
> "Seq Scan on layertype (cost=0.00..20.39 rows=655 width=110)"
> " Filter: (parentid = 300)"
The server thinks that every row of the table matches the WHERE clause.
That being the case, it's making the right choice to use a seqscan.
The question is why is the rows estimate so far off? Have you ANALYZEd
the table lately?
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, christo@mecola.com
Subject: Re: test / live environment, major performance difference
In-Reply-To: <8385.1181664586@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