MySQL Forums
Forum List  »  MyISAM

SQL problem
Posted by: Abhishek Srivastava
Date: September 01, 2006 11:26AM

Hi guys,

One of my queries is taking hours to give result. Both of them have the field 'eFaxId' which is integer and indexed. Can anyone explain why sql is not using the index key in first table ?

QUERY: select *
from eFax.e0806Q as a
left join eFax.e0806Link as b

on a.eFaxId = b.eFaxId

where b.eFaxId is Null
limit 100;

If I write EXPLAIN, this is the output i get.

id select_type table type possible_keys key key_len ref rows extra
--- ----------- ----- ---- ------------- --- ------- --- ---- -----
1, 'SIMPLE', 'a', 'ALL', '', '', '', '', 36726935, ''
1, 'SIMPLE', 'b', 'ALL', 'eFaxid', '', '', '', 30719078, 'Using where; Not exists'

Many thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
SQL problem
2874
September 01, 2006 11:26AM
1506
September 01, 2006 11:49AM
1554
September 02, 2006 03:13AM
1700
October 04, 2006 11:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.