Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Howard Cole <howardnews(at)selestial(dot)com>, "'PgSql General'" <pgsql-general(at)postgresql(dot)org>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)
Date: 2008-11-20 16:11:44
Message-ID: 2672.1227197504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> I'm quite curious about why setting the transaction to readonly helped
> its performance. Could it be to do with setting hint bits or something
> along those lines, perhaps? Anyone?

AFAIK that's actually a pessimization. Declaring the transaction READ
ONLY does not activate any optimizations that wouldn't be there
otherwise, and it causes a few more cycles to be expended to check that
each statement is allowed under READ ONLY rules. So I think that this
report is mistaken, and the performance change came from something else.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2008-11-20 16:18:27 Re: List Ettiquette (perhaps Off Topic by now) was: Re: Database access over the Internet...
Previous Message Richard Huxton 2008-11-20 15:54:20 Re: example of really weird caching (or whatever) problem