Anssi Kääriäinen<anssi.kaariai...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to