Is there any way to improve the efficiency of the following query?
Currently, this query takes more than 15 min to complete (73 min of
records) - and I have to check the whole database which is 7 days!!!
(basically, this will take forever).
I tried the query without the indexes and it's MUCH slower. It takes
just less than a minute (55 secs) to check 5 min between
inputserialnumbers. There must be a better way.
Here is what I need. A query to return all inputserialnumber from
either med or mrd where medstatus <> 'T' and ALL mrdstatus = ...