|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Index hints in a view.Hi
SQL Server 2000 SP4 I am using view in my stored procedure. The view gets data from only one table. I can not use table directly due to some reasons. I would like to add an index hint to this table. Is View definition the only place for that? I tried to add hint index to the view directly in the FROM clause of my SP but i got a message that the hint is ignored. Thanks in advance. For the view, you can do index hints on indexed views only. Otherwise, to
specify a specific index for a table in the view, you will need to modify the view and supply the table hint for the index you want to use for the required table using the WITH INDEX () hint. -- Show quoteAndyP, Sr. Database Administrator, MCDBA 2003 "Alexander Korol" wrote: > Hi > > SQL Server 2000 SP4 > > I am using view in my stored procedure. The view gets data from only one > table. I can not use table directly due to some reasons. I would like to add > an index hint to this table. Is View definition the only place for that? I > tried to add hint index to the view directly in the FROM clause of my SP but > i got a message that the hint is ignored. > > Thanks in advance. |
|||||||||||||||||||||||