SQL在1秒内插入100万行数字列

DBCC DROPCLEANBUFFERS

DBCC FREEPROCCACHE

declare @beginTime datetime

set @beginTime=getdate()

SELECT TOP 1000000 ROW_NUMBER() over (order by c1.object_id) as RowNumber

INTO dbo.t_Numbers

FROM master.sys.all_columns c1

CROSS JOIN master.sys.all_columns c2

select datediff(ms,@beginTime,getdate()) as[Time(ms)]

posted @ 2012-02-28 16:44  银色奇迹  阅读(247)  评论(0编辑  收藏  举报