Why would the following query take a couple hours to run? Using regular table processing would be less than 1 minute. Table A has approx 10k recs, B approx 50k recs.
SELECT adnumber, entryyear,EntryMonthDay FROM Tablea A
where a.entryyear = '2005' and not exists
(select * from Tableb B
where substring(b.Number,1,8) = a.number and b.type=15)
order by a.number
Thanks.
SELECT adnumber, entryyear,EntryMonthDay FROM Tablea A
where a.entryyear = '2005' and not exists
(select * from Tableb B
where substring(b.Number,1,8) = a.number and b.type=15)
order by a.number
Thanks.