Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1366B9FB48D for ; Fri, 12 Jan 2007 11:32:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 43995-04 for ; Fri, 12 Jan 2007 11:32:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 3ED3E9FB489 for ; Fri, 12 Jan 2007 11:32:05 -0400 (AST) Received: (qmail 20551 invoked from network); 12 Jan 2007 15:32:03 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 12 Jan 2007 15:32:03 -0000 In-Reply-To: <45A797B5.6020800@tethyshealth.com> References: <45A6B07F.3050902@tethyshealth.com> <45A797B5.6020800@tethyshealth.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: exclusive locking on SELECT ? Date: Fri, 12 Jan 2007 10:32:14 -0500 To: James Neff X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/91 X-Sequence-Number: 16456 On 12-Jan-07, at 9:14 AM, James Neff wrote: > Dave Cramer wrote: >> >> On 11-Jan-07, at 4:47 PM, James Neff wrote: >> >>> Greetings, >>> >>> I have 3 clients trying to do a select on the same table >>> (different rows). pgAdmin III Server Status shows the queries >>> and has as mode "Exclusive Lock" for all three. >> Are you doing select for update ? If so why so many rows ? >> >> > > No updates, just a select. Is there a way (in Java) to only select > one row at a time from a resultset, and is this a good idea? The > clients are processing rows from this one table in 2000 record > chunks. There are about 9 million rows total to process. you can setFetchSize to allow the driver to fetch fewer at a time. > > >>> >>> How would I go about diagnosing this situation, and how do I fix it? >> >> Have you tuned the server ? > > I'm doing a search now on "tuning postgres". Do you have any > suggested links that might pertain to my particular situation? Well, I'd have to see exactly what the machine was doing, how big it is, etc. Dave > > Thanks again, > James >