From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Rob Schall <rschall@callone.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Identical Queries
Date: Thu, 1 Mar 2007 11:39:09 -0800 (PST)
Message-ID: <20070301112948.R45862@megazone.bigpanda.com> (raw)
In-Reply-To: <45E6F49D.3010707@callone.net>
References: <45E6F49D.3010707@callone.net>
On Thu, 1 Mar 2007, Rob Schall wrote:
> Question for anyone...
>
> I tried posting to the bugs, and they said this is a better question for here.
> I have to queries. One runs in about 2 seconds. The other takes upwards
> of 2 minutes. I have a temp table that is created with 2 columns. This
> table is joined with the larger database of call detail records.
> However, these 2 queries are handled very differently.
How many rows are there in anitmp and how many rows in anitmp have
istf=true and how many have istf=false? If you don't currently analyze the
temp table after adding the rows, you might find that doing an analyze
helps, or at least makes the row estimates better.
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: sszabo@megazone.bigpanda.com, rschall@callone.net
Subject: Re: Identical Queries
In-Reply-To: <20070301112948.R45862@megazone.bigpanda.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