Indexing SET field

Posted by Dienow on Stack Overflow See other posts from Stack Overflow or by Dienow
Published on 2010-04-15T14:28:00Z Indexed on 2010/04/15 14:33 UTC
Read the original article Hit count: 279

Filed under:
|
|
|

I have two entities A and B. They are related with many to many relation. Entity A can be related up to 100 B entities. Entity B can be related up to 10000 A entities. I need quick way to select for example 30 A entities, that have relation with specified B entities, filtered and sorted by different attributes.

Here how I see ideal solution: I put all information I know about A entities, including their relations with B entities into single row (Special table with SET field) then add all necessary indexes. The problem is that you can't use index while querying by SET field. What should I do? I can replace database with something different, if that'll help.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about many-to-many