I posted the Need SQL help on query yesterday and got it to work, but the performance is slow.
Someone from a different forum suggested the use of a JOIN to improve performance.
What they suggested was:
SELECT Subset.*
FROM Subset
LEFT OUTER JOIN Master ON Subset.ID = Master.ID
WHERE Master.ID IS NULL
Unfortunately my Master.ID is never NULL.
Any ideas on how to redo the query ...
SELECT * FROM Subset
WHERE
Subset.ID STARTING WITH 'V' AND
(
NOT EXISTS
(
SELECT * FROM Master WHERE
Master.ID = Subset.ID
)
)
... using a JOIN (instead of the embedded SELECT) to improve performance?
Thanks,
Eric
Eric Tishler
Software Architect
Resolute Partners, LLC
Someone from a different forum suggested the use of a JOIN to improve performance.
What they suggested was:
SELECT Subset.*
FROM Subset
LEFT OUTER JOIN Master ON Subset.ID = Master.ID
WHERE Master.ID IS NULL
Unfortunately my Master.ID is never NULL.
Any ideas on how to redo the query ...
SELECT * FROM Subset
WHERE
Subset.ID STARTING WITH 'V' AND
(
NOT EXISTS
(
SELECT * FROM Master WHERE
Master.ID = Subset.ID
)
)
... using a JOIN (instead of the embedded SELECT) to improve performance?
Thanks,
Eric
Eric Tishler
Software Architect
Resolute Partners, LLC