I have read a book, which suggests we should change OR to UNION for better
performance, but currently I have too many OR clauses(I have a query with
100 ORs) and it does not sound good to have 100 UNION.
Any suggestion?
Will it help if I create an index for (SetID, PID)?
SELECT FileID, PID FROM File WHERE SetID = 4 AND
(PID = \path\subpath\morepath\0107.html OR
PID = \path\subpath\morepath\0101.html OR
PID = \path\subpath\morepath\0103.html OR
PID = \path\subpath\morepath\0105.html OR
PID = \path\subpath\morepath\0106.html OR
PID = \path\subpath\morepath\0102.html OR
PID = \path\subpath\morepath\0117.html OR
PID = \path\subpath\morepath\0127.html OR
PID = \path\subpath\morepath\0137.html OR
PID = \path\subpath\morepath\0147.html);