I read the manual on indexes but i am a little confused how i should build the type of index i need.

i have this structure:

| id | item | type
--------------------
|| 3 || 23  || news
|| 4 || 46  || faqs
|| 5 || 23  || news
|| 6 || 23  || news

query:

SELECT id, item, type ...
FROM comments
WHERE item = 23 AND type = 'news'

i want a mulitple column index in this case i assume?

INDEX name (item, type);

is this correct? anything else i should know?
i didn't pay attention to query speed until the site started to explode, so i need to speed up queries i created 2 years ago.

thanx.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.0/63 - Release Date: 8/3/2005


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

Reply via email to