SQL Server performance and fully qualified table names

后端 未结 5 1598
感动是毒
感动是毒 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:56

    Try it out? Just loop through a million queries of both and see which one finishes first.

    I'm guessing it's a load of bunk though. The developers of MS SQL spend millions of hours researching efficiency for search algorithms and storage methods only to be thwarted by users not specifying fully qualified table names? Laughable.

提交回复
热议问题