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 |
jnewton
Starting Member
3 Posts |
Posted - 2007-09-06 : 11:16:12
|
Hi,In using the Index Tuning Wizard to optimize a query, it was recommended by the wizard that I add an index to a temporary view (_hypmv_33). The query being analyzed doesn't reference this view, so SQL must be generating it on the fly. However, I'm not sure how it can expect me to create an index on it.Any ideas?Thanks,Joel |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-09-10 : 16:20:08
|
it asks you to create the index on the view when it is being created...or put your subquery in a view or function perhaps?--------------------keeping it simple... |
 |
|
jnewton
Starting Member
3 Posts |
Posted - 2007-09-10 : 18:05:43
|
Hi, Jen,I don't completely follow your question. The view is apparently being created dynamically by SQL Server. The Index Tuning Wizard, after analyzing 1 query that I have in Query Analyzer, recommends that I add an index to a dynamic view, which doesn't necessarily exist at that point.Does anyone know if it's standard practice for SQL Server 2000 to create dynamic views? No literature that I've seen mentions it.Thanks. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-09-10 : 18:13:04
|
I don't trust the Index Tuning Wizard. It doesn't always pick the correct indexes.Could you post your query that you want to optimize so that we can help you pick the best indexes.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
jnewton
Starting Member
3 Posts |
Posted - 2007-09-10 : 18:30:48
|
Hi, Tara,Thanks for the offer, but I'm more interested in finding out about temp views.Cheers,Joel |
 |
|
|
|
|
|
|