Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

7.2 items

5 views
Skip to first unread message

Tom Ivar Helbekkmo

unread,
Jun 7, 2001, 7:14:41 AM6/7/01
to
Bruce Momjian <pg...@candle.pha.pa.us> writes:

> Here is a small list of big TODO items. I was wondering which ones
> people were thinking about for 7.2?

A friend of mine wants to use PostgreSQL instead of Oracle for a large
application, but has run into a snag when speed comparisons looked
good until the Oracle folks added a couple of BITMAP indexes. I can't
recall seeing any discussion about that here -- are there any plans?

-tih
--
The basic difference is this: hackers build things, crackers break them.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

mlw

unread,
Jun 7, 2001, 7:44:09 AM6/7/01
to
Tom Ivar Helbekkmo wrote:
>
> Bruce Momjian <pg...@candle.pha.pa.us> writes:
>
> > Here is a small list of big TODO items. I was wondering which ones
> > people were thinking about for 7.2?
>
> A friend of mine wants to use PostgreSQL instead of Oracle for a large
> application, but has run into a snag when speed comparisons looked
> good until the Oracle folks added a couple of BITMAP indexes. I can't
> recall seeing any discussion about that here -- are there any plans?

I have tried to bring this up in several different forms, and hardly ever get a
nibble.

Bitmap indexes are great for text searching. Perhaps you can use
"fulltextindex" in the contrib directory. It isn't as fast as a bitmap index,
and the syntax would be different, but it would be perform better.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Bruce Momjian

unread,
Jun 7, 2001, 11:59:35 AM6/7/01
to
> Bruce Momjian <pg...@candle.pha.pa.us> writes:
>
> > Here is a small list of big TODO items. I was wondering which ones
> > people were thinking about for 7.2?
>
> A friend of mine wants to use PostgreSQL instead of Oracle for a large
> application, but has run into a snag when speed comparisons looked
> good until the Oracle folks added a couple of BITMAP indexes. I can't
> recall seeing any discussion about that here -- are there any plans?

It is not on our list and I am not sure what they do.

--
Bruce Momjian | http://candle.pha.pa.us
pg...@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

mlw

unread,
Jun 7, 2001, 2:43:03 PM6/7/01
to
Bruce Momjian wrote:

> > Bruce Momjian <pg...@candle.pha.pa.us> writes:
> >
> > > Here is a small list of big TODO items. I was wondering which ones
> > > people were thinking about for 7.2?
> >
> > A friend of mine wants to use PostgreSQL instead of Oracle for a large
> > application, but has run into a snag when speed comparisons looked
> > good until the Oracle folks added a couple of BITMAP indexes. I can't
> > recall seeing any discussion about that here -- are there any plans?
>
> It is not on our list and I am not sure what they do.

Do you have access to any Oracle Documentation? There is a good explanation
of them.

However, I will try to explain.

If you have a table, locations. It has 1,000,000 records.

In oracle you do this:

create bitmap index bitmap_foo on locations (state) ;

For each unique value of 'state' oracle will create a bitmap with 1,000,000
bits in it. With a one representing a match and a zero representing no
match. Record '0' in the table is represented by bit '0' in the bitmap,
record '1' is represented by bit '1', record two by bit '2' and so on.

In a table where comparatively few different values are to be indexed in a
large table, a bitmap index can be quite small and not suffer the N * log(N)
disk I/O most tree based indexes suffer. If the bitmap is fairly sparse or
dense (or have periods of denseness and sparseness), it can be compressed
very efficiently as well.

When the statement:

select * from locations where state = 'MA';

Is executed, the bitmap is read into memory in very few disk operations.
(Perhaps even as few as one or two). It is a simple operation of rifling
through the bitmap for '1's that indicate the record has the property,
'state' = 'MA';

Mike Mascari

unread,
Jun 7, 2001, 3:40:51 PM6/7/01
to
And in addition,

If you submitted the query:

SELECT * FROM addresses WHERE state = 'OH'
AND areacode = '614'

Then, with bitmap indexes, the bitmaps are just logically ANDed
together, and the final bitmap determines the matching rows.

Mike Mascari
mas...@mascari.com

Bruce Momjian wrote:

When the statement:

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majo...@postgresql.org

Oleg Bartunov

unread,
Jun 7, 2001, 3:42:21 PM6/7/01
to
I think it's possible to implement bitmap indexes with a little
effort using GiST. at least I know one implementation
http://www.it.iitb.ernet.in/~rvijay/dbms/proj/
if you have interests you could implement bitmap indexes yourself
unfortunately, we're very busy

Oleg

> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: ol...@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majo...@postgresql.org)

Bruce Momjian

unread,
Jun 7, 2001, 4:08:32 PM6/7/01
to
> I think it's possible to implement bitmap indexes with a little
> effort using GiST. at least I know one implementation
> http://www.it.iitb.ernet.in/~rvijay/dbms/proj/
> if you have interests you could implement bitmap indexes yourself
> unfortunately, we're very busy
>

I have added this thread to TODO.detail and TODO:

* Add bitmap indexes [performance]

Very interesting to use GIST for this.

--
Bruce Momjian | http://candle.pha.pa.us
pg...@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majo...@postgresql.org so that your
message can get through to the mailing list cleanly

Bruce Momjian

unread,
Jun 7, 2001, 4:08:52 PM6/7/01
to
> And in addition,
>
> If you submitted the query:
>
> SELECT * FROM addresses WHERE state = 'OH'
> AND areacode = '614'
>
> Then, with bitmap indexes, the bitmaps are just logically ANDed
> together, and the final bitmap determines the matching rows.

Message added to TODO.detail. The use of AND seems like a very nice
optimization possible with bitmap indexes. Thanks.

--
Bruce Momjian | http://candle.pha.pa.us
pg...@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------

0 new messages