C
Chris
Hi there,
can anyone please help me out here? Which of those queries would execute
quicker and why
select ord_id from orders where datepart(year,date_ordered) = 2000
or
select ord_id from orders where date_ordered > '31/12/1999' and
date_ordered < '1/1/2001'
I would think it is the second query, since it does not need to go through
the whole record set to find 2000. The search is already limited to a
specific date therefore it performs faster.
Is that correct?
Thanks for your help
Chris
can anyone please help me out here? Which of those queries would execute
quicker and why
select ord_id from orders where datepart(year,date_ordered) = 2000
or
select ord_id from orders where date_ordered > '31/12/1999' and
date_ordered < '1/1/2001'
I would think it is the second query, since it does not need to go through
the whole record set to find 2000. The search is already limited to a
specific date therefore it performs faster.
Is that correct?
Thanks for your help
Chris