Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query) - Mailing list pgsql-general

From Tom Lane
Subject Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)
Date
Msg-id 2672.1227197504@sss.pgh.pa.us
Whole thread Raw
In response to Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Craig Ringer <craig@postnewspapers.com.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

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: example of really weird caching (or whatever) problem
Next
From: Bruce Momjian
Date:
Subject: Re: List Ettiquette (perhaps Off Topic by now) was: Re: Database access over the Internet...