Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- table index issue


sam222 - 10:57 am on Aug 9, 2011 (gmt 0)


I have a table having around 2 million records i have tried to put proper index but still returning 7 rows when i explain query and an expert advice will be highly appreciated, here is the explain query result:

id select_type table type possible_keys key key_len ref rows Extra:
1 SIMPLE table ref p_id,KF,All_Fields All_Fields 24 const,const,const,const,const,const 7 Using where; Using temporary; Using filesort


Query is:
explain
SELECT *
FROM table
WHERE cat =16
AND s1 =112
AND s2 =0
AND s3 =0
AND s4 =0
AND p_id =102
GROUP BY field
ORDER BY fc_od, f_od


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4349422.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com