Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>It is not necessary to put dbo. in front of table names in SQL server.

Depending on default schema, it definitely can have performance considerations on compilation.

Maybe some of those team conventions are actually based on real world things.

From: https://msdn.microsoft.com/en-us/library/dd283095%28v=sql.10...

SELECT * FROM Table1

Will assess the following statement first: SELECT * FROM <defaultschema>.Table1

If it cannot find the object, the server will assess the following statement: SELECT * FROM dbo.Table1.

The assessment process can be improved by using either the fully qualified name or the DEFAULT_SCHEMA option described earlier. By setting a value for DEFAULT_SCHEMA for the user, the server will check the DEFAULT_SCHEMA first, removing an unnecessary ownership checking process. This can improve performance considerably on heavily utilized systems.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: