I think performance wise 2nd is faster
Which 1 do you recommend and why?
SELECT * FROM dbo.customers
SELECT * FROM customers
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Oct 28, 2011, 5:35 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 28, 2011, 6:06 AM EDT
I think dbo is the database owner and not the database name, every database is default owned by dbo so both the query would gave same performance if not it will be very very difficult to find any visible difference.
VulpesRank #55 · 29.2K reputationPosted Oct 28, 2011, 6:58 AM EDT
Suthish NairRank #92 · 22.8K reputationPosted Oct 28, 2011, 10:53 AM EDT
It will be always a good practice to have table name with dbo or the schema where table resides..
Dipal ChoksiRank #199 · 12K reputationPosted Oct 29, 2011, 10:02 PM EDT
http://sqlblog.com/blogs/linchi_shea/archive/2007/06/30/performance-impact-of-procedure-calls-without-owner-qualification.aspx
VulpesRank #55 · 29.2K reputationPosted Oct 30, 2011, 3:38 AM EDT
Here's one which refers to dynamic name resolution generally, the conclusion being the same:
http://blogs.msdn.com/b/mssqlisv/archive/2007/03/23/upgrading-to-sql-server-2005-and-default-schema-setting.aspx
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 30, 2011, 7:19 AM EDT
I think, 'dbo' will not speed up query Execution. The Performance depends on several issues like, for example, if the table has clustered indexes or not. Indexes are main factor used in Select Query execution by sql server.
i suggest you to refer this Article for, optimizing query performance.
http://tonesdotnetblog.wordpress.com/2008/05/26/twelve-tips-for-optimising-sql-server-2005-queries/