set
statistics
time
on
select top 20 title, left ( [ content ] , 200 ) from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title, [ content ] from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 id,title from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title from test
where
id not in ( select top 20 id from test order by id desc )
order by id desc
SQL Server 分析和编译时间:
CPU 时间 = 16 毫秒,占用时间 = 44 毫秒。
SQL Server 执行时间:
CPU 时间 = 0 毫秒,占用时间 = 1 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 842 毫秒,占用时间 = 1078 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 78 毫秒,占用时间 = 246 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 47 毫秒,占用时间 = 63 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 47 毫秒,占用时间 = 58 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 62 毫秒,占用时间 = 75 毫秒。
速度差别出来了, 如果网站需要带简介 还得用一个字段才行的。。
select top 20 title, left ( [ content ] , 200 ) from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title, [ content ] from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 id,title from test
where
id < ( select min (id) from ( select top 20 id from test order by id desc ) as idlist)
order by id desc
select top 20 title from test
where
id not in ( select top 20 id from test order by id desc )
order by id desc
SQL Server 分析和编译时间:
CPU 时间 = 16 毫秒,占用时间 = 44 毫秒。
SQL Server 执行时间:
CPU 时间 = 0 毫秒,占用时间 = 1 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 842 毫秒,占用时间 = 1078 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 78 毫秒,占用时间 = 246 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 47 毫秒,占用时间 = 63 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 47 毫秒,占用时间 = 58 毫秒。
(20 行受影响)
SQL Server 执行时间:
CPU 时间 = 62 毫秒,占用时间 = 75 毫秒。
速度差别出来了, 如果网站需要带简介 还得用一个字段才行的。。