Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DEBC89F938C for ; Tue, 2 Jan 2007 14:37:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 50318-05 for ; Tue, 2 Jan 2007 14:36:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) by postgresql.org (Postfix) with ESMTP id 7C6679F931E for ; Tue, 2 Jan 2007 14:36:55 -0400 (AST) Received: from [209.162.219.253] (helo=dogma.v10.wvs) by servata.com with esmtpa (Exim 4.50) id 1H1oVF-0005yx-VF; Tue, 02 Jan 2007 10:36:50 -0800 Subject: Re: High update activity, PostgreSQL vs BigDBMS From: Jeff Davis To: Ron Cc: Guy Rouillier , PostgreSQL Performance In-Reply-To: References: <45935A49.6080602@burntmail.com> Content-Type: text/plain Date: Tue, 02 Jan 2007 10:36:47 -0800 Message-Id: <1167763007.14243.18.camel@dogma.v10.wvs> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/22 X-Sequence-Number: 22623 On Fri, 2006-12-29 at 07:52 -0500, Ron wrote: > A= go through each query and see what work_mem needs to be for that > query to be as RAM resident as possible. If you have enough RAM, set > work_mem for that query that large. Remember that work_mem is =per > query=, so queries running in parallel eat the sum of each of their work_mem's. Just to clarify, from the docs on work_mem at http://www.postgresql.org/docs/current/static/runtime-config- resource.html : "Specifies the amount of memory to be used by internal sort operations and hash tables before switching to temporary disk files. The value is specified in kilobytes, and defaults to 1024 kilobytes (1 MB). Note that for a complex query, several sort or hash operations might be running in parallel; each one will be allowed to use as much memory as this value specifies before it starts to put data into temporary files. Also, several running sessions could be doing such operations concurrently. So the total memory used could be many times the value of work_mem; it is necessary to keep this fact in mind when choosing the value. Sort operations are used for ORDER BY, DISTINCT, and merge joins. Hash tables are used in hash joins, hash-based aggregation, and hash-based processing of IN subqueries." Regards, Jeff Davis