troubleshooting Question

TSQL: Creating a Clustered Index on a View

Avatar of Software Engineer
Software Engineer asked on
Microsoft SQL ServerSQL
7 Comments1 Solution30 ViewsLast Modified:
Hi:

A query that I composed and am currently running is doing so very slowly.

The query contains references to two views.  I'm thinking about adding a clustered index to each view to improve performance and ultimately get the query to run faster.

But, if I add an index to a view, does it also add that index to the underlying tables of the view and cause issues for those tables?

Incidentally, I tried to add a clustered index to one of the views.  But, SQL would not do it because the view is not schema bound.  How do I make it schema bound?  If I do this, will doing so negatively affect its underlying tables?

Are there other ways of speeding up the run of a query other than adding indexes and removing references to unnecessary tables, as I just did?

Thanks!

Software Engineer
ASKER CERTIFIED SOLUTION
Pavel Celba
All in One

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros