Re: bit map indexes in postgres - Mailing list pgsql-novice

From Chris Browne
Subject Re: bit map indexes in postgres
Date
Msg-id 60u0fddvcq.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to bit map indexes in postgres  (Mogin Mohandas <moginmo@gmail.com>)
Responses Re: bit map indexes in postgres
List pgsql-novice
bnichols@ca.afilias.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.

pgsql-novice by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [GENERAL] SQL return value...
Next
From: Galliker Armin
Date:
Subject: store images in a database?