From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Cc: Gauri Kanekar <meetgaurikanekar@gmail.com>
Subject: Re: Confusing Query Performance
Date: Wed, 1 Oct 2008 13:12:59 -0700
Message-ID: <200810011312.59603.josh@agliodbs.com> (raw)
In-Reply-To: <7e4ba9550810010334q1ed0e93cn9e84f230a1028a2f@mail.gmail.com>
References: <7e4ba9550810010334q1ed0e93cn9e84f230a1028a2f@mail.gmail.com>
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
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: josh@agliodbs.com, meetgaurikanekar@gmail.com
Subject: Re: Confusing Query Performance
In-Reply-To: <200810011312.59603.josh@agliodbs.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