Home > database >  What database query problem, solving the Using the join buffer, make my query so fast
What database query problem, solving the Using the join buffer, make my query so fast

Time:04-01



Question 1: the EXPLAIN data row shows that more than 150 w, why query speed is so fast (the second picture is the execution time, there is no cache)
Question 2: in the case of figure 1, add an order by the main table id of the row shows more than 30 w, perform very slow (not pictured above, because there wasn't any good performed N minutes)
So I guess, is Using the join buffer to my query faster, the order by the reasons for the temporary table, result in slow, and if I want to order by, how to optimize the current index nct_alarm_message type, create, nct_alarm_message_user amu_amid, amu_userid,
  • Related