Referencing objects
Always reference objects by their two-part name (<schema>.<name>) in T-SQL code because not doing so has some performance implications.
Using two-part object names avoids name resolution delays during query compilation: if the default schema for a user connecting to SQL Server is dbo, and that user attempts to execute the stored HumanResources.uspUpdateEmployeePersonalInfo procedure for which it also has permissions, but simply references uspUpdateEmployeePersonalInfo, SQL Server first searches the dbo schema for that stored procedure before searching other schemas, thus delaying resolution and therefore execution. When that stored procedure is used at scale, it may introduce unwarranted overhead.
Two-part object names ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access