Re: Confusing Query Performance - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Confusing Query Performance
Date
Msg-id 200810011312.59603.josh@agliodbs.com
Whole thread Raw
In response to Confusing Query Performance  ("Gauri Kanekar" <meetgaurikanekar@gmail.com>)
List 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

pgsql-performance by date:

Previous
From: "David logan"
Date:
Subject: Re: Mystefied at poor performance of a standard query
Next
From: "H. William Connors II"
Date:
Subject: bizarre query performance question