I have the following query and the following 2 indexes, but I'm still getting the file port. Is there a way to optimize this further so that I avoid file management, or do I just need to live with it?
Inquiry:
SELECT * FROM table WHERE row1 > '0' OR row2 = '1' ORDER BY id DESC
Indices:
row1row2, ID
row1
row2, ID
EXPLAIN output:
Using sort_union (row1, row2_id); Use where; Using filesort
ORDER BY ROW2, ID or add index to ID.
Yes, you can. Just add an index like (id, row1, row2).
, , mySQL .
, sort_union() mySQL.
This is a bit late for an answer, but I want to say it using "or", possibly causing this problem. You can try combining with two different queries.
Source: https://habr.com/ru/post/1784621/More articles:URL decoding of Japanese characters, etc. In Java - javadynamic dataset with valueconverter - c #C # / C ++ X509Certificate2.Verify does not work OCSP when IE uses proxy authentication - c ++bitwise work class in Java - javaAny advantage of using forms and links to log out? - cssrailscast 197: error trying to add fields using javascript - javascriptmootools replace div content - javascripthow to fix this list assignment in mathematics - wolfram-mathematicaUsing jquery $ .get to determine return value? - jqueryMooseX Release Notes :: Types, hard test case :) - perlAll Articles