I have 2 questions:
1. Is EXISTS faster than Inner Join?
I have a query that's slow and i'm trying to redo it.
Select .... from TB1 Inner Join TB2 ON f1 = f2
inner join libray.TB3 ON f2 = f3
TB3 is in another library. I just want to see if rows are there in TB3. I dont want to necessarily match rows to get data back. I want to execute the query when TB3 as rows that match f2 field in TB2.
2. SQL Server has "index hint" where I can force my query to use a particular index. My query sometimes uses an index I created, sometimes it uses a Logical that my manager created. I want it to use my index.
I see this when I turn on iSeries Navigator's query plan to see the execution of the query.
1. Is EXISTS faster than Inner Join?
I have a query that's slow and i'm trying to redo it.
Select .... from TB1 Inner Join TB2 ON f1 = f2
inner join libray.TB3 ON f2 = f3
TB3 is in another library. I just want to see if rows are there in TB3. I dont want to necessarily match rows to get data back. I want to execute the query when TB3 as rows that match f2 field in TB2.
2. SQL Server has "index hint" where I can force my query to use a particular index. My query sometimes uses an index I created, sometimes it uses a Logical that my manager created. I want it to use my index.
I see this when I turn on iSeries Navigator's query plan to see the execution of the query.




Comment