Here is the command line explain, earlier i had used phpAdmin +---------+--------+-------------------------------------+--------------+---------+--- ------------------+------+-------------------------------------------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---------+--------+-------------------------------------+--------------+---------+--- ------------------+------+-------------------------------------------+ | b | ref | id,p_id,combine | combine | 4 | const | 5281 | Using where; Using index; Using temporary | | c | eq_ref | PRIMARY,p_id | PRIMARY | 4 | b.p_id | 1 | | | d | ref | name_id,out_id | out_id | 4 | c.out_id | 1 | | | a | ref | p_id | p_id | 4 | b.p_id | 3 | Using where | | e | eq_ref | PRIMARY,start_id,combine,taxId | PRIMARY | 4 | d.name_id | 1 | Distinct | | f | range | PRIMARY,name_id | PRIMARY | 4 | NULL | 2 | Using where; Distinct | +---------+--------+-------------------------------------+--------------+---------+--- ------------------+------+-------------------------------------------+
> But looking at your explain with is hard to understand as I mentioned above, > it look like your rows are 5281 * 1 * 1 * 4 * 2 or 42248 rows it has to go > through. I think u r right > Also see if you can change WHERE (f.name_id =45 OR f.name_id =56) to use IN. > It has proven to be much faster for me. But that won't speed it up .3 > seconds. i tried that i dint see any difference. If I take out the distinct explain doesnt show the "Using temporary" but I dint see any difference in the time also. Please let me know if you need any further information Thanks Karthik -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]