Re: bit map indexes in postgres

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: bit map indexes in postgres
Date: 2005-10-19 21:56:21
Message-ID: 60u0fddvcq.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

bnichols(at)ca(dot)afilias(dot)info (Brad Nicholson) writes:
> Mogin Mohandas wrote:
>
>>Hi all,
>> Does anybody have any idea whether there is any Bit-map
>>Index functionality in Postgres. Atleast is there methods to extend
>>postgres with bit-map indexes. Also if anybody has any experience with
>>adding new data types to postgres server, please respond.
>
> Bitmap indexs are coming in 8.1 (which is currently in beta).

It is worth noticing that these are not bitmaps on disk, but rather
are handled in memory.

Usage would be that you select the matching items from each relevant
b-tree index on disk so that the bitmap is established in memory.

From the release notes:

Allow index scans to use an intermediate in-memory bitmap (Tom)

In previous releases, only a single index could be used to do
lookups on a table. With this feature, if a query has WHERE
tab.col1 = 4 and tab.col2 = 9, and there is no multicolumn index
on col1 and col2, but there is an index on col1 and another on
col2, it is possible to search both indexes and combine the
results in memory, then do heap fetches for only the rows
matching both the col1 and col2 restrictions. This is very useful
in environments that have a lot of unstructured queries where it
is impossible to create indexes that match all possible access
conditions. Bitmap scans are useful even with a single index, as
they reduce the amount of random access needed; a bitmap index
scan is efficient for retrieving fairly large fractions of the
complete table, whereas plain index scans are not.
--
let name="cbbrowne" and tld="cbbrowne.com" in name ^ "@" ^ tld;;
http://cbbrowne.com/info/advocacy.html
A VAX is virtually a computer, but not quite.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Glaesemann 2005-10-19 22:33:30 Re: SQL return value...
Previous Message Brad Nicholson 2005-10-19 19:58:32 Re: bit map indexes in postgres