Subject 3 table join with SQL statements runs slow
Author randmonroe
SELECT A9.CERT, A9.STATUS, A10.ADMINISTRATOR, A9.PROCESS_DATE,
A9.CANCEL_DATE,
A10.FINANCE_COMPANY, A2.Dealer_id
FROM ALLCANCEL a9 join ALLSALES a10 on (A9.CERT = A10.CERT)
join DEALERS a2 on (a10.dealer_id = a2.dealer_id)
and a9.status = 'Cancelled'
and a10.administrator = 'SZO'
and a9.process_date >= '5/17/02 00:00:00'

***the above code runs in 1.2 seconds

but when I add...

and a9.process_date <= '5/17/02 23:59:59'

then the process runs

56.630 sec

Thank you,
Randy