문제

I have a requirement for some reporting and different environments, and the SQL Synonym would make a lot of sense with making our solution work.

http://technet.microsoft.com/en-us/library/ms177544.aspx

However, the operational support department doesn't like the idea, due to 'performace implications'. I can't see why there would be any performance degradation. But, has anyone had experience with SYNONYMs and medium sized databases (100gb) and performance issues?

Should I be worried, or have Microsoft covered this, and whether you use a SYNONYM, or the fully qualified [Database].[schema].[tablename] in a query - is there any difference - performance wise?

도움이 되었습니까?

해결책

Here is a good SO thread on synonyms. Performance shouldn't be an issue on same server. I'm not sure cross server.

https://stackoverflow.com/questions/796791/sql-server-synonyms-tips-tricks

다른 팁

Anytime you use linked servers or cross-database queries you introduce potential and well documented performance issues. For example, the query typically becomes a distributed query. Also, the Optimizer has limited or no access to remote statistics so the query plan is unlikely to be 'optimal'. Using a synonym just hides the complexity under an alias that usually looks like a local reference and tempts developers to do things across the linked server that they should not such as nested sub-queries and complex, multi-table joins.

That said, I am seriously considering synonyms but I will emphasize their special nature by a naming convention (e.g. syn_theTable) and coding rules :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top