Default Locking Granularity for Local Temp Tables - Microsoft SQL Server 2000
What is the locking granularity used for local temp tables in MSSQL? Given that local temp tables are local to sessions, and sessions are the same as connections in MSSQL2K, and that there is no way to execute any statements o开发者_StackOverflow中文版r other code in parallel on the same connection through TSQL or other means (I believe), then intuitively the DB should just hold an exclusive table lock for the lifetime of the table. This would avoid locking memory usage and locking escalation. I can't get a clear answer on this anywhere. Is this the case?
A # temp table just a table, but sits in tempdb. The same locking granularity applies because it is a table.
精彩评论