You are on page 1of 1

Mysql queries speed up points:

1.Removal of unnecessary parentheses:

((a AND b) AND c OR (((a AND b) AND (c AND d))))
-> (a AND b AND c) OR (a AND b AND c AND d)

2.Constant folding:
(a<b AND b=c) AND a=5
-> b>5 AND b=c AND a=5

3.Constant condition removal (needed because of constant folding):

(B>=5 AND B=5) OR (B=6 AND 5=5) OR (B=7 AND 5=6)
-> B=5 OR B=6

full text search