Re: On-disk bitmap index patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: On-disk bitmap index patch
Date
Msg-id 5085.1153802202@sss.pgh.pa.us
Whole thread Raw
In response to Re: On-disk bitmap index patch  (mark@mark.mielke.cc)
Responses Re: On-disk bitmap index patch  (mark@mark.mielke.cc)
Re: On-disk bitmap index patch  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
List pgsql-hackers
mark@mark.mielke.cc writes:
> Reading 1/4, for a larger table, has a good chance of being faster than
> reading 4/4 of the table. :-)

Really?

If you have to hit one tuple out of four, it's pretty much guaranteed
that you will need to fetch every heap page.  So using an index provides
zero I/O savings on the heap side, and any fetches needed to read the
index are pure cost.  Now you have to demonstrate that the CPU costs
involved in processing the index are significantly cheaper than the cost
of just testing the WHERE qual at every heap tuple --- not a bet that's
likely to win at a one-in-four ratio.

> Will it be worth it or not? I won't know until I try it. :-)

Agreed.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Help! - Slony-I - saving/setting/restoring GUC
Next
From: Tom Lane
Date:
Subject: Re: Better name/syntax for "online" index creation