SQL Server performance and fully qualified table names

后端 未结 5 1599
感动是毒
感动是毒 2021-01-12 02:30

It seems to be fairly accepted that including the schema owner in the query increases db performance, e.g.:

SELECT x FROM [dbo].Foo vs SELECT x FR

5条回答
  •  别那么骄傲
    2021-01-12 02:46

    SQL server will not make an extra look up if the default schema is the same. It should be included if it's not and it's a query that is used a lot.

    The database name will not benefit the query performance. I think this could be seen with the Estimated Execution Plan in the Management Studio.

提交回复
热议问题