this query executing for longer time. Any idea on simplifying this query?
While fetching data from sql db in thingworx , this query executing for morethan 80 seconds. Any idea on simplifying this query?
Query:
SELECT distinct a.cmp , a.engseq , a.it, null as COUNT
FROM ENGINEERING a
WHERE a.MODEL like 'R24R%'
AND a.cmp not in (
select cmp
from ENGINEERING
where MODEL like 'R23R%' ) ;

