Re: are index scans possible with bitwise comparison
Thanks Jay, for an excellent answer
I have two supplemental questions arising from it.
If I add 3 further conditions:
1) I fix the number of bits, I currently have 7
2) Speed is more important than space
3) There is not a 50:50 distribution in the 1 / 0 values and I know for each of the bits which will have the greater probability 1 or 0.
Q 1) Then would it be better to simply make the 7 bits separate indexed TINYINT(1) fields?
Indexing binary values seems inherently inefficient, however so does joining tables.
Q 2) Does the BIT type, mentioned very little in the 4.1 docs as available from 5.05 for InnoDB, give any advantage for the type of solution proposed in ‘Q 1’?
Thanks again for your incisive answer
Regards
Gary Byatt
Subject
Views
Written By
Posted
9648
July 21, 2005 12:38AM
6082
July 21, 2005 07:14AM
Re: are index scans possible with bitwise comparison
3380
July 22, 2005 02:23AM
4707
July 22, 2005 12:59PM
2755
July 25, 2005 08:00AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.