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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Oct 30, 2011, 11:19 AM
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/
VulpesPosted Oct 30, 2011, 7:38 AM
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
Dipal ChoksiPosted Oct 30, 2011, 2:02 AM
http://sqlblog.com/blogs/linchi_shea/archive/2007/06/30/performance-impact-of-procedure-calls-without-owner-qualification.aspx
Suthish NairPosted Oct 28, 2011, 2:53 PM
It will be always a good practice to have table name with dbo or the schema where table resides..
VulpesPosted Oct 28, 2011, 10:58 AM
Javeed M ShaikhPosted Oct 28, 2011, 10:06 AM
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.
VulpesPosted Oct 28, 2011, 9:35 AM