pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Is ANALYZE transactional?
2+ messages / 2 participants
[nested] [flat]

* Is ANALYZE transactional?
@ 2007-11-06 05:12  Craig James <craig_james@emolecules.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Craig James @ 2007-11-06 05:12 UTC (permalink / raw)
  To: pgsql-performance

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.)

Thanks,
Craig



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Is ANALYZE transactional?
@ 2007-11-06 05:30  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Craig James <craig_james@emolecules.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2007-11-06 05:30 UTC (permalink / raw)
  To: Craig James <craig_james@emolecules.com>; +Cc: pgsql-performance

Craig James <craig_james@emolecules.com> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-11-06 05:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-06 05:12 Is ANALYZE transactional? Craig James <craig_james@emolecules.com>
2007-11-06 05:30 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox