The invention discloses an SQL statement optimization method based on constant substitution. The SQL statement optimization method based on constant substitution comprises the following steps: step 1, a substitution chain table is created according to a Boolean expression of WHERE clauses in a target SQL statement; step 2, the substitution chain table is traversed and a driving expression is searched for, wherein the driving expression is an equivalent expression, one side of the equivalent condition is a column, the other side of the equivalent condition is a constant, the next step continues to be executed if the driving expression is found through searching, and the step 2 is ended otherwise; step 3, according to the current driving expression, constant substitution is conducted on the target SQL statement, the substitution chain table is adjusted, and the current driving expression is marked; step 4, a next driving expression continues to be searched for, the step 3 is executed again if the next driving expression is found through searching, and the step 4 is ended otherwise. The SQL statement optimization method based on constant substitution has the advantages of being high in optimization level, and capable of improving system performance substantially.