On the usefulness of hint bits

From: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: On the usefulness of hint bits
Date: 2010-10-11 13:20:29
Message-ID: 507511.99303.qm@web29004.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I was wondering what is the advantage of having hint bits for OLAP
-style workloads, that is when the number of transactions is not
that high.

If I got it right, in 10 pg_clog pages we can store the status for more
than 320000 transactions. That's a lot, in a very small space
(80KB?).

So I was wondering what's the gain we get from hint bits in cases
where pg_clog is "small" (that is, will be cached by postgresql/the
OS).

does somebody have some numbers on the effect of hint bits on
first/second reads?

I mean:

create mytable as .....

select * from mytable -> this one will update hint bits
select * from mytable -> this one will use them

to test it I guess we should change the code to have:

a version where they are never updated (that is, always look at
pg_clog)
(so that you don't have to write them the first time, and you'll get the
"true" reading time + pg_clog reading time)

a version that always set them to COMMITTED
(so that you don't have to write them the first time, and you'll get the
"true" reading time for the "second" read that would use them,
regardless of any pg/OS cache)

I'm asking because I don't like having all those writes on the
first scan... and I would like to know what the real benefit is for the
reads that come after the first one in case there are "few"
transactions per second (for example, less than 1 transaction per
second)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-10-11 13:29:16 Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous Message Markus Wanner 2010-10-11 11:47:30 Re: Issues with Quorum Commit