Hi, Andrew,

Since your query is based on individual bits of the binary encoded
index, it would make sense that the binary index should be able to
answer them quickly.  However, the current implementation in FastBit
attempt to recode the incoming values into an internal set of binary
numbers that are all consecutive and starts with 0.  If your input
values are already a set of consecutive integers starting with 0, then
the bit vectors corresponds to the binary digits, otherwise, the
recoding does not corresponds to the binary digits.

If the bit vectors are the binary digits, then it is possible to
process query of the form "A & 1001 = 1001" quickly.  Otherwise, we
might have to fall back to primitive options such as read the values
of A and perform the bitwise logical operation and compare..

John


On 7/12/12 5:24 AM, Olson, Andrew wrote:
> If a column is indexed with binary encoding, you should be able to answer 
> this kind of query within the index by combining the corresponding 
> bitvectors.  Would that be more efficient than scanning the data directly as 
> described?  I guess it is a function of the size of the WAH compressed 
> bitvectors to interrogate.
> 
> Andrew
> 
> On Jul 12, 2012, at 3:09 AM, "Lidawei (Davey)" 
> <[email protected]<mailto:[email protected]>> wrote:
> 
> 
> Hi Petr,
> 
> 
> 
> I think what you want is “WHERE (flags & 0x1001) == 0x1001”, if you want ALL 
> flags be true.
> 
> 
> 
> Then “WHERE (flags & 0x1001)!=0”, if you want ANY flag be true
> 
> 
> 
> In my scenario, 8 bit flag is not enough :-(  Hope John can realize a more 
> long bit stream…
> 
> 
> 
> Cheers,
> 
> Davey
> 
> 
> 
> Date: Mon, 9 Jul 2012 10:02:10 +0200
> 
> From: Thorgrin <[email protected]<mailto:[email protected]>>
> 
> Subject: Re: [FastBit-users] Is it possible to eliminate the
> 
>          rescursion of    ibis::qExpr::simplify
> 
> To: FastBit Users 
> <[email protected]<mailto:[email protected]>>
> 
> Cc: "K. John Wu" <[email protected]<mailto:[email protected]>>
> 
> Message-ID:
> 
>          
> <CALbOe5PmsL_kRSydgSx=8kzxw05emj6fdfhykuw3-lhlhqm...@mail.gmail.com<mailto:CALbOe5PmsL_kRSydgSx=8kzxw05emj6fdfhykuw3-lhlhqm...@mail.gmail.com>>
> 
> Content-Type: text/plain; charset=UTF-8
> 
> 
> 
> Hi John,
> 
> 
> 
> just skipping through the FastBit mail conference, this email caught my eye. 
> I would greatly appreciate the bit operator feature. In our scenario we are 
> using BYTE to store TCP flags values. But it makes it impossible to ask for 
> value of a specific bit regardless of the others. If I was able to use 
> something like "WHERE flags & 1001"
> 
> (binary of decimal), it would be really great.
> 
> 
> 
> Regards,
> Petr
> _______________________________________________
> FastBit-users mailing list
> [email protected]<mailto:[email protected]>
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to