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