SQLTeam.com | Weblogs | Forums

Querying same result set for other procedures


my requirement is like creating three reports. in each procedure initial data set is same i.e. using some joins and tables. once i get this filtered output i used this to join other tables (in each four procedures) and get final result set. So what is best flow which give result with minimal performance hurt? indexed View can help here?


too little information. Please post your CREATE TABLE statements and the queries used to prepare the initial data set and some sample data and expected output


we need to generate three reports. Each report is called with SP. So total we have three SP.
Input for SP is one common SELECT statement and based on filters, each SP returns different result used for three reports. Sometime all three reports generated at same time. So to avoid performance hurt can we put that common SELECT statement into indexed view??? or any other way to get results with minimum performance hurt?



Also, please post the common select statement and how you apply filters to it.

Note that we can't say if an indexed view will have any impact on your performance without seeing these things