sql - Why MYSQL doesn't use my indexes? -


I have a table of karton00 , in which thousands of records. This slows down the questions I would like to use indexes, but even though I set them up, they are not being used.

and

This is my query:

  select 'checkbox, k00_eszkozid, k00_eszkoznev, k01_gyariszam, k01_leltszam, prsn_name, k00_status, tstikon, k00_startflow , k00_eszkozid on tstname, k00_eszkozid, k01_gyariszam, Join karton00 left the k01_leltszam karton01 = k01_eszkozid and k01_status = 'a' Left Join karton02 on k00_eszkozid = k02_eszkozid and k02_status = 'a' except k00_eszkozid = k04_eszkozid and k04_status = 'a' on karton04 left k00_eszkozid = k05_eszkozid and k05_status = left "a" except k00_eszkozid = k06_eszkozid and k06_status = 'a' on karton06 two karton08 O N k00_eszkozid = k08_eszkozid and k08_status = 'a' except kart_06_uszkozid = k09_eszkozid and k09_status = 'a' skip karton05 Telep Hely and leave k06_telephelyid = et.telepid on ktghely00 one at k02_ktghid = ek.ktghid leave the person on us k06_userid = prsn_id join the left ktghely00 fk at prsn_ktgh = fk.ktghid on the telefahly foot at left prsn_telep = ft.telepid include left Join k02_tamstatusid = tstid on the tamstatus left on the szakleltar include k02_szakleltarid = szleltid on the left tamszerv on k02_tamszervid = tszid include the left ktghely01 at k02_vgazdaid = vgid and vgstatus = 'a' join the left ktghely00 vk on vgktghid = vk.ktghid on k05_mincegid = m.szallid LEFT JOIN Szallit right on k04_szallitoid = s.szallid LEFT JOIN dctnry00 ym oN k05_minosit = ym.dctnryna me and ym.dctnrygrp = 'YESNO' Leave dctnry00 yd on k05_check = yd.dctnryname and yd.dctnrygrp = 'YESNO where k00_status IN (' A ',' H ') and (k02_vgazdaid IN (7)) and does not exist (Choose from Asjhokojhkhajhr SEE ez_flid = 0 and ez_emintaid = k00_eszkozmintaid and k00_uzembedatum & lt; (Date_add (Curdate, INTERVAL ez_honap month)) and k00_uzembedatum! = '' And not k02_vgazdaid IN (7)) and no (select * eszkozkizar WHERE ez_flid = 0 and ez_emintaid = k00_eszkozmintaid and k02_tamszervid = ez_tamszerv and k02_tamstatusid = ez_tamsts and k00_uzembedatum & lt; (Date_add (curdate), INTERVAL ez_honap month) ) And k00_uzembedatum! = '' And k02_vgazdaid IN (7)) order by k00_eszkoznev ASC;  

Also USE INDEX (index_list) statement You can use:


Comments