Home All Groups Group Topic Archive Search About

Fully qualified object names help reuse of execution plans.

Author
3 Sep 2005 11:51 AM
Damien
Fully qualified object names help reuse of execution plans.

Is this true?  Discuss.

Also, what constitutes fully qualified?

Is it

server.database.owner.object

or can you get away with

database.owner.object

and still resuse your execution plans?

Thanks

Author
3 Sep 2005 1:40 PM
Andrew J. Kelly
You should read this KB.  Even though it is for 2005 most of the same
principles still apply.

http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx

As for your question of what does fully mean well that depends.  Mostly it
means you should always specify the object owner along with the object.

dbo.yoursp  or dbo.yourtable etc.

If you are accessing an object from within the same db then just specify the
owner and the object.  Do not specify the database as it is no necessary and
actually invokes a few more lines of code than necessary.  If you need to
specify an object in another db on the same server than you must specify
that as well.

OtherDB.dbo.Object


--
Andrew J. Kelly  SQL MVP


Show quote
"Damien" <Dam***@discussions.microsoft.com> wrote in message
news:2BBC6EA6-2E85-4643-8E07-16E031D8E8A9@microsoft.com...
> Fully qualified object names help reuse of execution plans.
>
> Is this true?  Discuss.
>
> Also, what constitutes fully qualified?
>
> Is it
>
> server.database.owner.object
>
> or can you get away with
>
> database.owner.object
>
> and still resuse your execution plans?
>
> Thanks
>
Author
3 Sep 2005 4:30 PM
Mike Epprecht (SQL MVP)
Hi

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_4azp.asp

If you want more information, get yourself "Inside SQL Server 2000" by Kalen
Delaney.

owner.object is good enough for re-use.
--
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: m***@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

Show quote
"Damien" <Dam***@discussions.microsoft.com> wrote in message
news:2BBC6EA6-2E85-4643-8E07-16E031D8E8A9@microsoft.com...
> Fully qualified object names help reuse of execution plans.
>
> Is this true?  Discuss.
>
> Also, what constitutes fully qualified?
>
> Is it
>
> server.database..object
>
> or can you get away with
>
> database.owner.object
>
> and still resuse your execution plans?
>
> Thanks
>

AddThis Social Bookmark Button