开发者

Performance of view (as a table alias) over a table

开发者 https://www.devze.com 2023-02-14 12:05 出处:网络
Using a view to encapsula开发者_Python百科te a table whose name changes yearly (tablename_year) called \"vw_Tablename_Current\" so I don\'t have to change any procs that use the table to reflect the n

Using a view to encapsula开发者_Python百科te a table whose name changes yearly (tablename_year) called "vw_Tablename_Current" so I don't have to change any procs that use the table to reflect the new table name, just the view.

This is temporary until I'm able to make deeper model changes. Is there any performance hit on wrapping a single table in a view like this?

Sql Server 2005


You can use a synonym as well which is cleaner

   CREATE SYNONYM tablename FOR tablename_year;


No, there is no performance difference if the view is essentially a SELECT * FROM table

0

精彩评论

暂无评论...
验证码 换一张
取 消