SQL is really not my specialty. I am more of an architect/designer. Since we lacked personel in my team, my boss told gave me the task of trying to rewrite a long sql statement to improve performance because the time it takes to retrieve the result is getting longer and longer.
The sql basically consist of long and repetetive conditions which joins records from two or more tables.
Select id, field1, field2, field3 from TableA, TableB, TableC........Table Z where
TableA.id = TableB.id ans TableA.id = TableC.id and TableA.id = TableD.id.........TableA.id = TableZ.id
Would it improve performance if I used INNER JOIN instead? I am also planning to make it a stored procedure instead of it as a JDBC sql statement? would that make it faster too?
The example query you provided already uses inner join operations, albeit without the explicit join notation.
Replacing the implicit notation won't improve the performance of the query. At all.
Though it would improve readability, in my opinion.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Joined: Aug 11, 2005
So what could be the reason then? its really in the volume of the return data?