X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 326AE11F8D03 for ; Thu, 20 Apr 2006 13:50:18 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.41 X-Spam-Level: X-Spam-Status: No, score=-2.41 required=5 tests=[AWL=0.189, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id j9RhFVdC3DhQ for ; Thu, 20 Apr 2006 13:50:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 1078811F6C36 for ; Thu, 20 Apr 2006 13:50:04 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 015F656423; Thu, 20 Apr 2006 11:50:03 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 20 Apr 2006 11:50:02 -0500 Date: Thu, 20 Apr 2006 11:50:02 -0500 From: "Jim C. Nasby" To: Mario Splivalo Cc: Pgsql performance Subject: Re: SELECT FOR UPDATE performance is bad Message-ID: <20060420165002.GY49405@pervasive.com> References: <1145365720.18469.35.camel@localhost.localdomain> <13037.1145370658@sss.pgh.pa.us> <1145371662.31555.10.camel@localhost.localdomain> <13609.1145374386@sss.pgh.pa.us> <1145434854.4458.12.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1145434854.4458.12.camel@localhost.localdomain> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060420:mario.splivalo@mobart.hr::mJRdkamWiSDDmQPz:0000000000000 00000000000000000000000032ZC X-Hashcash: 1:20:060420:pgsql-performance@postgresql.org::MNo/pupjhINAZ8cV:00000 0000000000000000000000001uRS X-Archive-Number: 200604/461 X-Sequence-Number: 18545 On Wed, Apr 19, 2006 at 10:20:54AM +0200, Mario Splivalo wrote: > This works perfectly, but sometimes the game has no codes, and I still > need to know exactley who came first, who was second, and so on... So a > locking table as Tom suggested is, I guess, a perfect solution for my > situation... Depending on your performance requirements, you should look at contrib/userlock as well, since it will probably be much more performant than locking a row in a table. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461