Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Rainmann
Starting Member
5 Posts |
Posted - 2011-08-15 : 15:04:39
|
| I have created a complex view that gives me all the data I want, but it performs horribly. I cannot create indexes over the view due to using outer joins and subqueries.What I'm trying to figure out is, am I using the wrong tool for the job? When should a view be used? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-08-15 : 15:09:58
|
| It's hard to say without seeing the code. It would help if you posted it.Also, do you need to select all the data the view provides, or just a subset? In that case, a stored procedure may be a better option (parameter passing in particular). Do you need to join the results of the view to other data? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|