Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TdizA-0004ag-P6 for pgsql-performance@arkaria.postgresql.org; Wed, 28 Nov 2012 14:51:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tdiz9-00023X-Lb for pgsql-performance@arkaria.postgresql.org; Wed, 28 Nov 2012 14:51:35 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdiz8-00023R-JO for pgsql-performance@postgresql.org; Wed, 28 Nov 2012 14:51:34 +0000 Received: from mailout-us.gmx.com ([74.208.5.67]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tdiz2-0000Fd-9W for pgsql-performance@postgresql.org; Wed, 28 Nov 2012 14:51:34 +0000 Received: (qmail 5124 invoked by uid 0); 28 Nov 2012 14:51:27 -0000 Received: from 76.255.19.161 by rms-us012 with HTTP Content-Type: text/plain; charset="utf-8" Date: Wed, 28 Nov 2012 09:51:26 -0500 From: "Kevin Grittner" Message-ID: <20121128145126.69300@gmx.com> MIME-Version: 1.0 Subject: Re: Optimize update query To: =?iso-8859-1?Q?=22Niels_Kristian_Schj=F8dt=22?= ,pgsql-performance@postgresql.org X-Authenticated: #138763884 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: uUHEcHZ63zOlOQ09LnwhwuZ+IGRvbwDe X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Niels Kristian Schjødt wrote: > PS. I'm on postgres 9.2 on a server with 32gb ram, 8 cores and > two 3T disks in a software raid 1 setup. In addtion to the excellent advice from Shaun, I would like to point out a few other things. One query runs on one core. In a test of a single query, the other seven cores aren't doing anything. Be sure to pay attention to how a representative workload is handled. Unless you have tuned your postgresql.conf settings, you probably aren't taking very good advantage of that RAM. For heavy load you need lots of spindles and a good RAID controller with battery-backed cache configured for write-back. You will probably benefit from reading this page: http://wiki.postgresql.org/wiki/SlowQueryQuestions If you don't already have it, you will probably find Greg Smith's book on PostgreSQL performance a great investment: http://www.postgresql.org/docs/books/ -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance