Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

index for bitwise comparison?

 
   Database Help (Home) -> mySQL RSS
Next:  -952 Authentication Error on Solaris 10  
Author Message
sandro

External


Since: Mar 27, 2009
Posts: 1



(Msg. 1) Posted: Fri Mar 27, 2009 11:25 am
Post subject: index for bitwise comparison?
Archived from groups: comp>databases>mysql (more info?)

Hi,

is it any possible/usefull to add an index for bitwise comparison
(e.g.: ti2.t_m3 & 134217728). I don't think so but I'm not totally
sure.

Thanks
sandro

 >> Stay informed about: index for bitwise comparison? 
Back to top
Login to vote
toby

External


Since: Aug 21, 2008
Posts: 6



(Msg. 2) Posted: Fri Mar 27, 2009 6:53 pm
Post subject: Re: index for bitwise comparison? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mar 27, 10:58 am, sandro wrote:
> Hi,
>
>    is it any possible/usefull to add an index for bitwise comparison
>   (e.g.:  ti2.t_m3 & 134217728). I don't think so but I'm not totally
>   sure.
>
>   Thanks
>   sandro

No. But splitting the mask into individual indexed columns may help
you.

 >> Stay informed about: index for bitwise comparison? 
Back to top
Login to vote
toby

External


Since: Aug 21, 2008
Posts: 6



(Msg. 3) Posted: Sat Mar 28, 2009 6:21 am
Post subject: Re: index for bitwise comparison? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mar 27, 10:58 am, sandro wrote:
> Hi,
>
>    is it any possible/usefull to add an index for bitwise comparison
>   (e.g.:  ti2.t_m3 & 134217728). I don't think so but I'm not totally
>   sure.

An ordinary BTree index can help you narrow down the search if you
know the leading bits. For example, if your keys are 8 bits, values
matching
0,1,0,X,X,X,X,X
can be extracted by
key BETWEEN 64 AND (64+31)

Depending on your data and query patterns it may be more efficient to
break the bitmask into separate indexed columns, or even normalise
further into individual relations.

>
>   Thanks
>   sandro
 >> Stay informed about: index for bitwise comparison? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Best way to issue hundreds of inserts/updates??? - Using mysql 4.0.23- What is the best way to execute several (hundreds of) inserts and updates? Rather than issuing tons of individual inserts and updates, can I send the strings to a text file and then have mysql do them all?? IE : query.txt insert..

MySQL freezes, brings XP machine to a grinding halt - I've been using MySQL for a while for fairly light database development on my XP machine. Currently, I am just starting a new project and have experienced some big problems with MySQL today both on my office machine and at home where running a particular...

login as user 'root' but do not have root privlages and my.. - Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via..

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API mysql_query() hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me "it's already locked, don't try to run a FLUSH". Anyone know ...

Tool to convert DDL in graphical diagram? - Does anyone know of a tool that will create a graphical diagram from a DDL (SQL create script)? Preferable a free open-source tool. Thanks, A
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]