Skip site navigation (1) Skip section navigation (2)

Re: Join over two tables of 50K records takes 2 hours

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Svetlin Manavski <svetlin(dot)manavski(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Join over two tables of 50K records takes 2 hours
Date: 2011-10-14 04:38:16
Message-ID: CAOR=d=2zPgFH=sGNrqEe7OQp5PLAF2+SG5W3AS5ZRcom7S6p7w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
It seems like your row estimate are way off, with the planner
expecting 1 and getting 3000 or so.  Have you tried cranking up
default stats target to say 1000, running analyze and seeing what
happens?

If that doesn't do it, try temporarily turning off nested loops:

set enable_nestloop = off;
explain analyze yourqueryhere;

In response to

pgsql-performance by date

Next:From: CSSDate: 2011-10-14 08:23:48
Subject: SSD options, small database, ZFS
Previous:From: Tom LaneDate: 2011-10-14 04:37:48
Subject: Re: Join over two tables of 50K records takes 2 hours

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group