dc stein

dc stein

  • NA
  • 25
  • 30.9k

Sql Server Optimize

Jul 26 2011 10:14 AM
I have a question on how to optimize t-sql statement in a sql server 2008 r2 database. In my company one database is being redesigned into 9 other tables. This is due to to the one main table having everyrthing in it the entire database needed.
  I have a stored procedure that i need to change. This stored procedure in the old database only needed to refer to the one table. Now I need to join 9 tables together to obtain the same information.
  **Note this stored procedure is used to supply information into a C#.net 2008 windows application. The application displays information from this stored procedure for users to see. Basically i need all this inforamtion for the new version of the application to work.
Part of the problem is some of the new tables do not contain any inforamtion, since the original may not have contained any information. This, i need to do left outer joins so all rows display.
The new database has one table called 'NEW' that has lots of columns the are separate keys to the new tables.
Thus, can you tell me what to do to optimize this query?



Answers (4)