X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7A5509DC849 for ; Fri, 10 Mar 2006 23:44:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12732-02 for ; Fri, 10 Mar 2006 23:44:29 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by postgresql.org (Postfix) with ESMTP id 643589DC868 for ; Fri, 10 Mar 2006 23:44:21 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 71so213917wri for ; Fri, 10 Mar 2006 19:44:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kl6mxdsce0RpnpbJ+L863bOJw5GR1a2EpIza+IdGeNhw/imBaydSYc8x0RVRTxUs2fNPfaZtf6Igrw9Fgc3IzDA83YnPaXj14rN9FuEV5k36CiefNsH80Vm4mlL/91CZz8PdixrX9bcBjFo71s4PGQC4C2qxpmBTZoJ8iN71nb8= Received: by 10.54.117.8 with SMTP id p8mr1583840wrc; Fri, 10 Mar 2006 19:44:26 -0800 (PST) Received: by 10.54.98.6 with HTTP; Fri, 10 Mar 2006 19:44:26 -0800 (PST) Message-ID: Date: Fri, 10 Mar 2006 22:44:26 -0500 From: "Jaime Casanova" To: "ogjunk-pgjedan@yahoo.com" Subject: Re: READ COMMITTE without START TRANSACTION? Cc: pgsql-sql@postgresql.org In-Reply-To: <20060311010855.4341.qmail@web50314.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060311010855.4341.qmail@web50314.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.099 required=5 tests=[AWL=0.099] X-Spam-Score: 0.099 X-Spam-Level: X-Archive-Number: 200603/156 X-Sequence-Number: 24502 On 3/10/06, ogjunk-pgjedan@yahoo.com wrote: > Hello, > > I need to run some SELECT queries that take a while (10+ minutes) to comp= lete, and I'm wondering about the isolation about the results I get. More = precisely, while my SELECT is running, the DB is being updated by another a= pplication, and I am wondering which, if any, data changes my SELECT will s= ee. > > Example: > If I start my SELECT at 10:00, and it finishes at 10:10, will my results = include data that was inserted between 10:00 and 10:10? > Similarly, will my result include data that was updated between 10:00 and= 10:10? > The same question for data that was deleted during that period. > no > If it matters, my SELECT runs from psql client, while concurrent inserts,= updates, and deletes are executed from a separate application (webapp). > doesn't really matters > For my purposes in this case I need the SELECT to get the results that re= present data right at the beginning of the query - a snapshot. I read this= : http://www.postgresql.org/docs/8.1/static/transaction-iso.html and it lo= oks like this is the default PG behaviour (READ COMMITTED) > yes, it is > Question: > If I do not explicitly START TRANSACTION before the SELECT, will this REA= D COMMITTED XA behaviour still be in effect? > yes. all statements not executed inside a transaction block are in an implicit transaction > Thanks, > Otis > > -- regards, Jaime Casanova "What they (MySQL) lose in usability, they gain back in benchmarks, and tha= t's all that matters: getting the wrong answer really fast." Randal L. Schwartz