we have three types of data (tables):
- Book (id,name,author...) ( about 3 million of rows)
- Category (id,name) ( about 2000 rows)
- Location (id,name) ( about 10000 rows)
A Book must have at least 1 type of Category (up to 3) AND a Book must have only one Location.
I need to correlate this data to get this query faster:
Select Books where Category = 'cat_id' AND Location = 'loc_id'
Select Books where match(name) against ('name of book') AND Location = 'loc_id'
Please I need some help. Thanks