Re: [PERFORM] Index usage when bitwise operator is used

2007-09-18 Thread valgog
Hi Tom, do you think it would be a good idea to ask GIN index team to implement an int-based bitmap set indexing operator for GIN/GiST based indexes? Or there will be a possibility to somehow optimally index arrays of enumerations to implement such bitmap structures in 8.3 or later postgresql vers

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread W.Alphonse HAROUNY
Hi, A little clarification. Actually, TBL1.CATEGORY and/or TBL2.CATEGORY may hold a binary value having multiple binary(ies) '1'. Each binary value column represent an business attribute. If a binary value column is equal to '1', it means that the business attribute is True, otherwise it is fals

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread Kevin Grittner
>>> On Mon, Sep 17, 2007 at 8:37 AM, in message <[EMAIL PROTECTED]>, Tom Lane <[EMAIL PROTECTED]> wrote: > "Kevin Grittner" <[EMAIL PROTECTED]> writes: >> On Mon, Sep 17, 2007 at 2:49 AM, in message >> <[EMAIL PROTECTED]>, valgog >> <[EMAIL PROTECTED]> wrote:=20 >>> Are you sure you understood w

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: > On Mon, Sep 17, 2007 at 2:49 AM, in message > <[EMAIL PROTECTED]>, valgog > <[EMAIL PROTECTED]> wrote:=20 >> Are you sure you understood what was the question? >> >> Is the TBL1.CATEGORY = TBL2.CATEGORY the same as TBL1.CATEGORY & >> TBL2.CATEGORY >

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread Kevin Grittner
>>> On Mon, Sep 17, 2007 at 2:49 AM, in message <[EMAIL PROTECTED]>, valgog <[EMAIL PROTECTED]> wrote: >> What about saying?: >> >> TBL1.CATEGORY = TBL2.CATEGORY >> > > Are you sure you understood what was the question? > > Is the TBL1.CATEGORY = TBL2.CATEGORY the same as TBL1.CATEGORY & > T

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread valgog
> What about saying?: > > TBL1.CATEGORY = TBL2.CATEGORY > Are you sure you understood what was the question? Is the TBL1.CATEGORY = TBL2.CATEGORY the same as TBL1.CATEGORY & TBL2.CATEGORY > 0? ---(end of broadcast)--- TIP 6: explain analyze is

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-17 Thread valgog
Hi, I could not find and normal solution for that issue. But I am using some workarounds for that issue. The solution, that I am using now is to create an index for every bit of your bitmap field. So something like CREATE INDEX idx_hobbybit_0_limited ON "versionA".user_fast_index USING btre

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-16 Thread Kevin Grittner
>>> On Thu, Sep 13, 2007 at 7:30 AM, in message <[EMAIL PROTECTED]>, "W.Alphonse HAROUNY" <[EMAIL PROTECTED]> wrote: >and each binary value of [variableCategory] may only hold a single binary > '1'. > TBL1.CATEGORY & TBL2.CATEGORY <> 0 //-- where & is the AND bitwise > operator What abou

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-16 Thread Valentine Gogichashvili
Hi, I could not find and normal solution for that issue. But I am using some workarounds for that issue. The solution, that I am using now is to create an index for every bit of your bitmap field. So something like CREATE INDEX idx_hobbybit_0_limited ON "versionA".user_fast_index USING btre

[PERFORM] Index usage when bitwise operator is used

2007-09-13 Thread W.Alphonse HAROUNY
Hello, My question is about index usage when bitwise operations are invoked. Situation Context: -- Lets suppose we have 2 tables TBL1 and TBL2 as the following: TBL1 { . ; integer categoryGroup; // categoryGroup is declared as an index on TABL1 . ; }