Performance tune my sql query removing OR statements
- by SmartestVEGA
I need to performance tune following SQL query by removing "OR" statements
Please help ...
SELECT a.id, a.fileType, a.uploadTime, a.filename, a.userId, a.CID, ui.username, company.name companyName, a.screenName
FROM TM_transactionLog a, TM_userInfo ui, TM_company company, TM_airlineCompany ac
WHERE
(
a.CID = 3049
)
OR
(
a.CID = company.ID
AND
ac.SERVICECID = 3049
AND
company.SPECIFICCID = ac.ID
)
OR
(
a.USERID = ui.ID
AND
ui.CID = 3049
);