We have been testing a few sql statements and noticed that using an
inequality, for example:
where recdate '08/25/2008'
has much poorer performance than
where recdate between '08/25/2008' and '10/1/2008'
We saw timings of 5 1/2 minutes vs 1 second.
It also appears (from explain) that both statements use the index. Is
there documentation that someone could reference that would direct one
toward why the db engine is so much slower with the first statement?
inequality, for example:
where recdate '08/25/2008'
has much poorer performance than
where recdate between '08/25/2008' and '10/1/2008'
We saw timings of 5 1/2 minutes vs 1 second.
It also appears (from explain) that both statements use the index. Is
there documentation that someone could reference that would direct one
toward why the db engine is so much slower with the first statement?
Comment