SQL query to retrieve WTParts for given OR condition between 2 IBAs
HI all,
Can anyone please help me in optimizing the SQL query
. I have written a sql query to retrieve WTParts when 2 IBAs are given . (using OR, AND conditions).
SELECT A0.* FROM WTPart A0,UnitValue A1,StringValue A2,WTPARTMASTER A3 WHERE (A0.ida3masterreference=A3.ida2a2 and A3.WTPartNumber LIKE 'RT-3294%') AND (((A1.idA3A6 = 3853762) AND (A1.value = 0.037099) AND (A1.idA3A4 = A0.idA2A2)) OR ((A2.idA3A6 = 19907282) AND (A2.value = '22') AND (A2.idA3A4 = A0.idA2A2))) AND (A0.idA3view = 569) AND (A0.latestiterationInfo = 1) AND (A0.variation2 IS NULL ) AND (A0.statecheckoutInfo <> 'wrk').
But when this query is executed , its generating only 1 part more than 10k times . May I know if I have to modify the query.
Thanks.

