当前位置:Gxlcms > 数据库问题 > SQL Server 优化器特性导致的内存授予相关BUG

SQL Server 优化器特性导致的内存授予相关BUG

时间:2021-07-01 10:21:17 帮助过:2人阅读

Code

create table test_mem
(
id int identity(1,1) primary key,
itemid int not null,
date datetime not null,
str1 varchar(max) null
)

INSERT test_mem( itemid,date )
    SELECT TOP(1000)
        ABS(CHECKSUM(NEWID())) % 200,
        DATEADD(day, CHECKSUM(NEWID()) % (3 * 360), GETDATE())
    FROM sys.all_columns A, sys.all_columns B
    go 100

select * from  test_mem where itemid=28 order by date

执行代码后执行计划如图1-1

技术分享

人气教程排行