Search Postgresql Archives

Re: using new bitmap scans to index bit columns?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Nov 2005, TJ O'Donnell wrote:

I like the new bitmap scans and I'm wondering if there is any way
I can utilize them for my bitmask column, defined as bit(1024).
I use this column as a sort of fingerprint to quickly scan my tables.
But it is a scan, not an index.  I have not figured out a way to
index the bitmask column.  Is there some way it can be used as
an index now that there are bitmap scans in 8.1?

Currently I do this:
Select * from mytable where contains(bitmask, fingerprint(user_data))
and matches(datacolumn, user_data);

user_data is a string, like a regexp but with different semantics for chemical data.
bitmask is precomputed/stored as bit(1024) = fingerprint(datacolumn)
contains(a,b) returns bool as 'select b=(a&b);'

This works well because matches() is an expensive functions.
But it would work better if bitmask could be indexed, no?

You can use GiST to do that.


TJ O'Donnell

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


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

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux