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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Indexs on Views (Do the call to a view uses index

Author  Topic 

SarahBenjamin
Starting Member

4 Posts

Posted - 2009-04-30 : 14:23:20
Hi I have created a view on my server A which is caling a table from Server B. The table that its calling has a bunch of index on it. Now I want to know does a call to this view, considers the indexes on my table on server B. Its taking a lot of time to respond so I am thinking its not considering the indexes but pls shed some light on it. I am not very good with Views and Indexes. Have something like this on serverA

Create view history as
Select * from ServerB.siq.dbo.History
Please help Thanks -

Sarah

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-04-30 : 14:33:39
1. Select * from ... without WHERE-clause: there is no need to use index, because the complete table is to scan.
2. Selecting data from linked server is always a bit slower than reading data from local server.

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-04-30 : 15:52:14
Show us the query that calls the view.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -