Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Compilation Locks Expand / Collapse
Author
Message
Posted Monday, May 10, 2010 10:09 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, November 20, 2014 8:13 AM
Points: 2,917, Visits: 2,536
Comments posted to this topic are about the item Compilation Locks

Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
Post #919418
Posted Tuesday, May 11, 2010 12:10 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 3:56 AM
Points: 4,110, Visits: 5,474
Deep-delve points to remember, especially when it comes to applications with large databases.
Good question


____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #919456
Posted Tuesday, May 11, 2010 1:26 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 10:02 AM
Points: 1,194, Visits: 789
Good question, i learned some thing out of it.
Post #919482
Posted Tuesday, May 11, 2010 1:39 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, November 6, 2014 5:01 AM
Points: 2,116, Visits: 6,441
Good question. Had to read up on it and then even got it right

--------------------------------------------------------------------------
A little knowledge is a dangerous thing (Alexander Pope)

In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)
Post #919489
Posted Tuesday, May 11, 2010 1:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 9:21 PM
Points: 2,125, Visits: 5,546
While I agree that it is a good question, I think that there is a mistake in the answers. Since the question states that it is for SQL Server 2005, the fully qualified name of the object has nothing to do with the object’s owner. Instead it has to do with the object’s schema.

Adi


--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #919491
Posted Tuesday, May 11, 2010 2:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:52 AM
Points: 6,086, Visits: 8,355
Thanks, Steve. Nice question to remind of us one more reason (hah! as if we'd need one!) to always fully qualify our object names.

Small mistake in the explanation - is I read the referenced KB article, the compile lock occurs when both conditions are met, i.e. the SP is run by a non-owner, AND without using the fully qualified name. The explanation usees "or" instead of "and".



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #919500
Posted Tuesday, May 11, 2010 7:54 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, November 4, 2014 12:48 PM
Points: 2,818, Visits: 2,566
I did a fair amount of background reading on this question and it led me to several light bulb moments about my current coding practices. Thanks for a great question and a little bit of education first thing in the AM.
Post #919696
Posted Tuesday, May 11, 2010 8:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 8, 2014 11:02 AM
Points: 18, Visits: 661
Thank you for the great QOD! I really do appreciate the reminder to fully qualify names and reduce the work required by SQL Server. In this case, the lack of name qualification (laziness) causes SQL Server to place a compile lock on a potentially heavily used stored pocedure and substantially increasing runtimes.
Post #919741
Posted Tuesday, May 11, 2010 9:49 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 7:12 AM
Points: 31,284, Visits: 15,746
Explanation is corrected.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #919806
Posted Tuesday, May 11, 2010 11:03 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 8:33 AM
Points: 1,676, Visits: 1,760
This is a very good question, thank you Steve.

Fully qualified objects names is a must, not subjected to any second guessing. This is a very pathetic scenario when due to someone's ignorance the database engine is forced to acquire compile lock thus potentially causing block contention just to determine that recompilation is not necessarily required.

Oleg
Post #919876
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse