MySQL, Query, Optimization, Web Performance, Database.
unnecessary parentheses, reduce the or and and tree layers of the grammar, reduce cpu consumption 3, constant delivery. a=b and b=2 are converted to a=2 and b=2. Try not to use the variable a=b or a=@var 4, eliminate useless SQL conditions 5, where the right side of the number does not appear