SQL Server - 同义词Tips&技巧? [英] SQL Server - Synonyms Tips & Tricks?
问题描述
-
有没有人把它们当成全部打击
抽象层? -
性能成本是多少?
-
带有索引的问题
-
提示或技巧
我的第一个问题,请温柔。
谢谢
同义词是一个抽象/替代名称对于已存在的数据库对象,在表的情况下,索引行为与底层对象的行为相同,即生成执行计划时,将生成相同的计划,而不考虑使用表名或对应的同义词。
I've been doing a lot of DB refactoring lately and synonyms have come in incredibly useful. When I originally put in the synonyms I was thinking they would be very temporary while I refactor. Now I am thinking there might be some good reasons to keep some of these synonyms around.
Has anyone used them as full blow abstraction layer?
What are the performance costs?
Any gotchas with indexes?
Tips or Tricks?
My first question, so please be gentle.
Thanks
As a synonym is an abstraction/alternative name for an already existing database object, in the case of a table, index behaviour is identical to that of the underlying object i.e. when execution plans are generated, the same plan is generated irrespective of using the table name or corresponsing synonym.
这篇关于SQL Server - 同义词Tips&技巧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!