Vote count:
0
I created the index full text index on city for following
SELECT e.e_id,e.name,e.email,e.mobile, group_concat(distinct e.p_id),e.query,e.city,e.m_id,e.currentdate,e.status, mc.manager_id as cm_id FROM enq as e left join ma_cust as mc on e.mobile = mc.c_mobile and e.status=0 and mc.currentdate <= e.currentdate where match(e.city) againest ('wgl') and e.status >= 0 group by e.mail order by e.status asc, e.currentdate desc
With EXPLAIN results
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE fulltext city city 0 NULL 1 Using where; Using temporary; Using filesort
1 SIMPLE mc ALL c_mobile NULL NULL NULL 523 Range checked for each record (index map: 0x2)
When I execute this query it takes 3330 sec.But without index it takes 330 sec. I fully confused execution speed with indexes improve execution speed or not. How can I create indexes for above query to improve speed.
asked 9 secs ago
How to create index in joins mysql
Aucun commentaire:
Enregistrer un commentaire