Home All Groups Group Topic Archive Search About
Author
23 Mar 2006 2:16 PM
Alexander Korol
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.

Author
23 Mar 2006 2:46 PM
AndyP
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.

--
AndyP,
Sr. Database Administrator,
MCDBA 2003


Show quote
"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.

AddThis Social Bookmark Button