1
逻辑读取全局临时表,而不是会话级临时表
考虑以下简单的MCVE: SET STATISTICS IO, TIME OFF; USE tempdb; IF OBJECT_ID(N'tempdb..#t1', N'U') IS NOT NULL DROP TABLE #t1; CREATE TABLE #t1 ( r int NOT NULL ); IF OBJECT_ID(N'tempdb..##t1', N'U') IS NOT NULL DROP TABLE ##t1; CREATE TABLE ##t1 ( r int NOT NULL ); IF OBJECT_ID(N'dbo.s1', N'U') IS NOT NULL …