I have a table
foo(a1, a2, a3, a4, a5)
a1
is the primary key.
there is a non-clustering index on a5
.
I have a simple query:
SELECT *
FROM foo
WHERE a5/100 = 20;
This query runs significantly slower. updating the statistics used in query planning did not help much.
Why could this be happening? What could I be doing wrong? I'm new to query optimization.