Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A2FBB2E302F for ; Tue, 11 Mar 2008 12:57:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 30882-02 for ; Tue, 11 Mar 2008 12:57:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.176]) by postgresql.org (Postfix) with ESMTP id 3003B2E300E for ; Tue, 11 Mar 2008 12:56:58 -0300 (ADT) Received: by el-out-1112.google.com with SMTP id z25so1464442ele.0 for ; Tue, 11 Mar 2008 08:56:57 -0700 (PDT) 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:references; bh=QjvSdl9/FAXuOc2Jdgsiqs/MeNHcokAbB7C6m5/uuCA=; b=kVn6NF/0hOx+2NkHDai4+4vKl5LH+q6aJJXD1xMmJ+dVGG1YhiNC9I6+wU37ZOLL9UbW13euUEyMYFAZHpyNsDbzH2VX/9axLiMsZJ+Wad+bkDcPfDg+UEiyHujXJOjml6V+aKktLwXKJNbgj8T9kMsUJFnJHnc8ipjS0ReQtxE= 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:references; b=c2X+1DwKpKK18xb8eRB9E+MGlYCxuTTL3snXJwF21MFvh3FnVfu4L9vc4ThxqRWn5+hgqVSif0vD5ejy2RQjnx4wvsuGdJq9qs6cfSC+TLBi+a3LeGS38AStQLH9+MpPqfK04fmuaC8q9sUNRIVRiij77WV6rZLziu9vKiGig/k= Received: by 10.114.135.1 with SMTP id i1mr5021505wad.115.1205251016495; Tue, 11 Mar 2008 08:56:56 -0700 (PDT) Received: by 10.114.109.16 with HTTP; Tue, 11 Mar 2008 08:56:55 -0700 (PDT) Message-ID: Date: Tue, 11 Mar 2008 11:56:55 -0400 From: "Kynn Jones" To: "Tom Lane" Subject: Re: Joins and DELETE FROM Cc: "Heikki Linnakangas" , pgsql-performance@postgresql.org In-Reply-To: <6359.1205006926@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4020_20854251.1205251016491" References: <47D2D485.9040103@enterprisedb.com> <6359.1205006926@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/235 X-Sequence-Number: 29189 ------=_Part_4020_20854251.1205251016491 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for your post. I finally spent some quality time with the query planner section in the docs' server config chapter. Very instructive, even considering that most of it went over my head! On Sat, Mar 8, 2008 at 4:08 PM, Tom Lane wrote: ...have you got effective_cache_size set to something that's realistic for > your machine? I guess not. It was the default value (128MB) on a machine with 4GB of RAM. It's not a dedicated server, though, so I'll set it to 1G for now. But before doing so I need a clarification. The docs state that this parameter is used only for cost estimation, and has no effect on actual memory allocations. I imagine that if other memory-related settings are not somehow in line with it, it could lead to estimates that are out of touch with reality. If this is correct what other memory-related parameters do I need to adjust to ensure that both the planner's estimates and the actual execution agree and fit well with the available memory? One problem with this test is that your smaller tables probably fit in > memory whereas the big ones may not, so it's not a given that your test > accurately reflects how the real query will go down. > That's a very helpful reminder. Thanks. Kynn ------=_Part_4020_20854251.1205251016491 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for your post.  I finally spent some quality time with the query planner section in the docs' server config chapter.  Very instructive, even considering that most of it went over my head!

On Sat, Mar 8, 2008 at 4:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

...have you got effective_cache_size set to something that's realistic for your machine?

I guess not.  It was the default value (128MB) on a machine with 4GB of RAM.  It's not a dedicated server, though, so I'll set it to 1G for now.

But before doing so I need a clarification.  The docs state that this parameter is used only for cost estimation, and has no effect on actual memory allocations.  I imagine that if other memory-related settings are not somehow in line with it, it could lead to estimates that are out of touch with reality.  If this is correct what other memory-related parameters do I need to adjust to ensure that both the planner's estimates and the actual execution agree and fit well with the available memory?

One problem with this test is that your smaller tables probably fit in
memory whereas the big ones may not, so it's not a given that your test
accurately reflects how the real query will go down.

That's a very helpful reminder.  Thanks.

Kynn

------=_Part_4020_20854251.1205251016491--