Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2A4452E00CF for ; Wed, 13 Feb 2008 17:36:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 03989-01-7 for ; Wed, 13 Feb 2008 17:36:10 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by postgresql.org (Postfix) with ESMTP id 207A12E0202 for ; Wed, 13 Feb 2008 17:36:08 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so251847waf.5 for ; Wed, 13 Feb 2008 13:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=umpaxHLWJUexsdGIhgHNjQbnbySTf3r1hS2COOkrK+o=; b=RbvQhkd//0TZ2EoiOsHPghY0YbfYJG6T+Yyepxtty4IaYscH6vtKjtlNLpw2P7w3/pyrkFpJE3QTdaB9210P66T1uzKZy/WDKsUMk9JMVP3de3woYdniW1Ev09nTP2SV6wpidmuYZb2sXidfSS3b3NX/v7N/2Ge5IYa9gdXbwNM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ldpURRZWksf7iHO4uCpqnIFI/Bjb+ouHhd6yPQWFA5bJvyCjqwT+SNQojeWIMckHXi2KHjCqObbPw11S3ugIWYHvUMoUhPFDCV5yioti9O+qYqaCCASZaY2K5XlISmOwT8NGaspj9l3xHd0DQGi6Z/JXhIw/6InOGd+u3J4C/DA= Received: by 10.114.66.2 with SMTP id o2mr497123waa.111.1202938567538; Wed, 13 Feb 2008 13:36:07 -0800 (PST) Received: by 10.114.131.4 with HTTP; Wed, 13 Feb 2008 13:36:07 -0800 (PST) Message-ID: Date: Wed, 13 Feb 2008 15:36:07 -0600 From: "Scott Marlowe" To: "Thomas Zaksek" Subject: Re: Join Query Perfomance Issue Cc: pgsql-performance@postgresql.org In-Reply-To: <47B170BF.5000206@ptt.uni-due.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47B08F19.8000500@ptt.uni-due.de> <47B170BF.5000206@ptt.uni-due.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/152 X-Sequence-Number: 28694 On Feb 12, 2008 4:11 AM, Thomas Zaksek wrote: > I tried turning off nestloop, but with terrible results: Yeah, it didn't help. I was expecting the query planner to switch to a more efficient join plan. > I also tried to increase work_men, now the config is > work_mem = 4MB Try setting it higher for JUST THIS query. i.e. set work_mem=128M; explain analyze select .... and see how that runs. Then play with it til you've got it down to what helps. Note that work_mem in postgresql.conf being too large can be dangerous, so it might be something you set for just this query for safety reasons.