Subject Re: [ib-support] 3 table join with SQL statements runs slow
Author Svein Erling Tysvær
Randy,
occationally things run slower because IB/FB decides to use too many
indexes. I suspect that is what you are experiencing. Change your select to

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 between '5/17/02 00:00:00' and '5/17/02 23:59:59' or 3=0)

and I guess your query would run fast again.

Set