I am working on a project that needs maximum performance in SQL results, and was looking for query optimization, but after some trial and error, I am having some problems with IN.
SELECT sysdba.HISTORY.TICKETID FROM sysdba.HISTORY
where TICKETID = 't6UJ9A002MJC'
SELECT sysdba.C_TICKETPROVIDERS.* FROM sysdba.C_TICKETPROVIDERS
where sysdba.C_TICKETPROVIDERS.TICKETID = 't6UJ9A002MJC'
SELECT sysdba.C_TICKETPROVIDERS.* FROM sysdba.C_TICKETPROVIDERS
where sysdba.C_TICKETPROVIDERS.TICKETID NOT IN
(SELECT DISTINCT sysdba.HISTORY.TICKETID FROM sysdba.HISTORY)
If the last query result at least does not match the previous one, since there are no corresponding results ???
source
share