Re: Identical Queries

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Rob Schall <rschall(at)callone(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Identical Queries
Date: 2007-03-01 19:39:09
Message-ID: 20070301112948.R45862@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-03-01 20:12:56 Re: stats collector process high CPU utilization
Previous Message Joshua D. Drake 2007-03-01 15:47:28 Re: increasing database connections