Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B4CF09F9254 for ; Tue, 6 Nov 2007 01:30:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28025-06 for ; Tue, 6 Nov 2007 01:30:19 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5A9E99F9251 for ; Tue, 6 Nov 2007 01:30:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA65UZQc008740; Tue, 6 Nov 2007 00:30:35 -0500 (EST) To: Craig James cc: PGSQL Performance Subject: Re: Is ANALYZE transactional? In-reply-to: <472FF7C5.2060402@emolecules.com> References: <1d219a6f0711051043x569b7f51r4cee3353e6ea9f10@mail.gmail.com> <472F781F.6080200@enterprisedb.com> <472FF7C5.2060402@emolecules.com> Comments: In-reply-to Craig James message dated "Mon, 05 Nov 2007 21:12:37 -0800" Date: Tue, 06 Nov 2007 00:30:34 -0500 Message-ID: <8739.1194327034@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/68 X-Sequence-Number: 27483 Craig James writes: > If I do: > begin; > update some_table set foo = newvalue where a_bunch_of_rows_are_changed; > analyze some_table; > rollback; > does it roll back the statistics? (I think the answer is yes, but I need to be sure.) Yes --- ANALYZE doesn't do anything magic, just a plain UPDATE of those rows. (You could have easily tested this for yourself...) regards, tom lane