Anssi Kääriäinen<anssi.kaariainen@thl.fi> wrote:
> A speed test showing a significant drop in performance when using
SSI:
>
> hot2=> create table test_t2 as (select generate_series(0, 1000000));
> hot2=> \timing
> begin transaction isolation level repeatable read;
> Time: 0.185 ms
> hot2=> select count(*) from test_t2;
> Time: 134.521 ms
> hot2=> select count(*) from test_t2;
> Time: 142.132 ms
> hot2=> select count(*) from test_t2;
> Time: 147.469 ms
> hot2=> commit;
> hot2=> begin transaction isolation level serializable;
> Time: 0.165 ms
> hot2=> select count(*) from test_t2;
> Time: 349.219 ms
> hot2=> select count(*) from test_t2;
> Time: 354.010 ms
> hot2=> select count(*) from test_t2;
> Time: 355.960 ms
> hot2=> commit;
>
> So, count(*) queries are more than twice as slow compared to the old
> serializable transaction isolation level.
Thanks for the report. I'll profile tat and see what can be done about
it.
-Kevin