I run an SQL query on a large table filled with millions of records. WHERE clauses are a series of LIKE, comparing the input with several text fields.
Below is the query execution time for various inputs (on average 3-5 passes each).
* 'aaaa' : ~3.1 seconds
* 'aaa@' : ~2 seconds
* 'aa@a' : ~9.7 seconds
* 'a@aa' : ~9.7 seconds
* 'aa@a' : ~9.8 seconds
All queries returned a similar number of results (12-13). I checked this with other letters (non-duplicate, etc.) instead of “a”, and the results were more or less the same.
What am I missing?
thank
Miki source
share