Re: SSI patch version 8 - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: SSI patch version 8
Date
Msg-id 4D2DAA350200002500039395@gw.wicourts.gov
Whole thread Raw
In response to Re: SSI patch version 8  (Anssi Kääriäinen <anssi.kaariainen@thl.fi>)
List pgsql-hackers
Anssi Kääriäinen<anssi.kaariainen@thl.fi> wrote:
> So, count(*) queries are more than twice as slow compared to the
> old serializable transaction isolation level.
I've looked at this enough to know that I can do something about
that, but wanted to point out that this is a good example of why you
should specify READ ONLY when possible.  My numbers:
begin transaction isolation level repeatable read;
Time: 394.946 ms
Time: 248.675 ms
Time: 242.559 ms

begin transaction isolation level serializable;
Time: 494.676 ms
Time: 494.036 ms
Time: 491.712 ms

begin transaction isolation level serializable, read only;
Time: 234.075 ms
Time: 234.050 ms
Time: 234.057 ms

begin transaction isolation level serializable, read only,
deferrable;
Time: 233.494 ms
Time: 234.099 ms
Time: 235.290 ms
The slower times for REPEATABLE READ gave me pause, so I ran those
again:
begin transaction isolation level repeatable read;
Time: 233.946 ms
Time: 236.200 ms
Time: 236.414 ms
I guess the database just hadn't "warmed up" enough for the first
few tests....
-Kevin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_depend explained
Next
From: Tom Lane
Date:
Subject: RowMarks versus child tables with varying column sets