The optimal way for query speed would be to combine the most commonly
used categories. Because when you search the query categories, you will
find out that there is a small set of combinations (say 10) which are
used 90% of the time.

Example: you have the categories A, B, C, D, E, F, G, H, I. After
examining your data, you find out that querie distribution is:

A,D,E     30%
A,D,F     20%
A,G,H     10%
A,H       8%
...       ..

What you can see is that (A,D,E), (A,D,F) and (A,G,H) is used 60% of all
times. So you can make one "meta"attribute which exactly describes this
combination. Then link your table not to the single combinations, but to
this meta attribute. This should give you best performance. 

Things like that are normally used in DWH.

Cheers
/rudy

-----Original Message-----
From: awarsd [mailto:[EMAIL PROTECTED] 
Sent: donderdag 17 juli 2003 17:45
To: [EMAIL PROTECTED]
Subject: complex query qusetion

Hi,

I'm looking at some search engine where we can have up to 14-15
categories and each categories have about 5-10 option (checkbox)

my question is if we have a complex query like this
would it be better to split some categories in tables
i.e we have 21 different categories should we have 7 tables(indexed)
with three columns, then do a big join statment?? or any other better
way?

awards

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to