Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Got a stored procedure, first with continuous 5 inner joins and next 4 left joins

how to optimize this procedure , can i use temp tables instead of continuous inner join , will their be any improvement

Kindly advise
Posted
Comments
Nitesh Kejriwal 27-Aug-13 12:32pm    
Yes, using temp tables to do these number of joins will be helpful and will make the query more faster,
ZurdoDev 27-Aug-13 13:14pm    
There is no way anyone can say without seeing your SQL and your schema.

1 solution

1) Start by using the SQL Profiler and index tuning wizard (if you are using MSSQL or similar products from other vendors) and optimizing indexes.
2) Break down your query into stages or pieces.
3) Test creating temp tables on the pieces and seeing the results.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900