Re: Confusing Query Performance

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: "Gauri Kanekar" <meetgaurikanekar(at)gmail(dot)com>
Subject: Re: Confusing Query Performance
Date: 2008-10-01 20:12:59
Message-ID: 200810011312.59603.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wednesday 01 October 2008 03:34, Gauri Kanekar wrote:
>    ->  Nested Loop  (cost=186.26..647160.32 rows=42543 width=16) (actual
> time=655.832..6622.011 rows=5120582 loops=1)

That nested loop estimate is off by 100x, which is why the DB is using a
slow nested loop for a large amount of data. I'd try increasing your
statistics collection, analyze, and re-run the query.

--
--Josh

Josh Berkus
PostgreSQL
San Francisco

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message H. William Connors II 2008-10-01 20:34:49 bizarre query performance question
Previous Message David logan 2008-10-01 16:38:21 Re: Mystefied at poor performance of a standard query