create an INDEX for a TVP in SQL 2008

依然范特西╮ 提交于 2019-12-24 05:44:33

问题


Can we create an Index for TVP's(Table valued Parameters) in SQL Server 2008.

please can any one give the syntax.

Thanks In advance.. Vinay K


回答1:


You can have primary key and unique constraints, which will automatically have indexes backing them, but you're unable to declare any indexes explicitly for table types


If you think your query could benefit from further indexes, pretty well you'll have to copy the rows from your TVP into a temporary table (not table variable), on which you can define any indexes you want. But obviously that will add some additional overhead (in time and memory costs)



来源:https://stackoverflow.com/questions/4645495/create-an-index-for-a-tvp-in-sql-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!