Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C47CD1336DB6 for ; Fri, 29 Oct 2010 14:18:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72586-01 for ; Fri, 29 Oct 2010 17:18:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 240331336705 for ; Fri, 29 Oct 2010 14:18:31 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 29 Oct 2010 12:18:30 -0500 Message-Id: <4CCABB8C0200002500036F8D@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 29 Oct 2010 12:18:20 -0500 From: "Kevin Grittner" To: , "Steve Wong" Subject: Re: MVCC and Implications for (Near) Real-Time Application References: <203952.56702.qm@web111712.mail.gq1.yahoo.com> In-Reply-To: <203952.56702.qm@web111712.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/582 X-Sequence-Number: 41000 Steve Wong wrote: > (1) Does the MVCC architecture introduce significant delays > between insert by a thread and visibility by other threads (I am > unclear about how multiple versions are "collapsed" or reconciled, > as well as how different query threads are seeing which version)? As soon as the inserting transaction commits the inserted row is visible to new snapshots. If you are in an explicit transaction the commit will have occurred before the return from the COMMIT request; otherwise it will have completed before the return from the INSERT request. You will get a new snapshot for every statement in READ COMMITTED (or lower) transaction isolation. You will get a new snapshot for each database transaction in higher isolation levels. -Kevin