Re: SSI patch version 8

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>
Cc: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>, "john(dot)okite(at)gmail(dot)org" <john(dot)okite(at)gmail(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SSI patch version 8
Date: 2011-01-12 19:18:45
Message-ID: 4D2DAA350200002500039395@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Anssi Kääriäinen<anssi(dot)kaariainen(at)thl(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-12 19:18:59 RowMarks versus child tables with varying column sets
Previous Message Robert Haas 2011-01-12 19:15:15 Re: pg_depend explained