Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-04-21 : 08:52:07
|
| It is written ..... that qualifying the owner name on a table reference will improve the performance finding the table.Select abc from dbo.Mytableis faster thanSelect abc from MyTableIs this true if there are no other ownders of MyTable other than dbo?Sam |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2003-04-21 : 10:12:36
|
| Yes, the behaviour is to always look for an object owned by the user that is executing the statement first if the object is not owner qualified. If the object name is not owner qualified then it will look for an object owned by the current user and then for the same object owned by dbo in the current database. Thus owner qualifying a table name will lead to less reads (of system tables such as sysobjects) than if you don't. Stored procedures are slightly different but the same principals apply. Avoiding ambiguity means less work for the server to do to process your statement.HTHJasper Smith0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27 |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-04-21 : 10:20:37
|
| Thanks Jasper.Sam |
 |
|
|
|
|
|