Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6C19D4761C4 for ; Wed, 11 Sep 2002 15:05:29 -0400 (EDT) Received: from smtp016.mail.yahoo.com (smtp016.mail.yahoo.com [216.136.174.113]) by postgresql.org (Postfix) with SMTP id 8DEC4475F86 for ; Wed, 11 Sep 2002 15:05:28 -0400 (EDT) Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 11 Sep 2002 19:01:05 -0000 Message-ID: <3D7F923C.9D1CED8C@Yahoo.com> Date: Wed, 11 Sep 2002 14:58:04 -0400 From: Jan Wieck Organization: Home X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,ru MIME-Version: 1.0 To: Timur Irmatov Cc: pgsql-general@postgresql.org Subject: Re: transactions References: <17021432388.20020911160825@sdf.lonestar.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/476 X-Sequence-Number: 30057 Timur Irmatov wrote: > > Hello! > > I develop a web-site with cgi-s written in perl, which access > PostgreSQL database.. > > In my scripts I have a sequence of selects. > > Is it faster to wrap them all in transaction ? Not only is it faster, it gives you the advantage of MVCC too, presenting you a snapshot of the database. So no concurrent UPDATES done by someone else are visible to you. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #