MySQL Forums
Forum List  »  Full-Text Search

Indexing abstract values - Take the CHALLENGE !
Posted by: james brooks
Date: October 16, 2007 03:41AM

im trying to make sort of an unusual logic for my table X

the values i write to the corresponding field in table X are masked, those of you who know subnetting will probably understand this easier:

ID - Value
--------------
1 - A
2 - B
4 - C
8 - D
16 - E
32 - F
64 - G

These are some values that can be stored in the field, yet they are not stored as shown above, all the ID get added together building 1 number.

What i want to acomplish is, that it should be possible indexing the table sothat i can look for - lets say - value B or value C and D etc without having to loop through the whole table..

one idea i had was forming additional groups A (val A-C), B (val D-F) etc - as for egsample B would have to be in group A, and C & E would be in groups A and B etc so in the end the groups could be indexed.. but there shud b a better way =/

any ideas?

thank you!



Edited 4 time(s). Last edit at 10/19/2007 02:31AM by james brooks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Indexing abstract values - Take the CHALLENGE !
3686
October 16, 2007 03:41AM


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.