zoukankan      html  css  js  c++  java
  • sqlserver2008 insert语句性能

    在sqlserver2008中“新建查询”,执行批量添加语句的执行时间:

    declare @i int
    set @i=1
    while(@i<=200000)
    begin
    
    INSERT INTO [xxx].[dbo].[北京万奇亚讯科技_QueryLog]
               ([ID]
               ,[IID]
               ,[IName]
               ,[QueryTime]
               ,[IsH]
               ,[IsC]
               ,[IsS]
               ,[ext1]
               ,[ext2]
               ,[CreateUser]
               ,[CreateTime]
               ,[UpdateUser]
               ,[UpdateTime])
         VALUES
               ('0ea1d805-8169-41eb-9822-6f40d50f1675'
               ,'a5f9b7ab84d55ff589745755b95cd97f4ca8cf75'
               ,'a5f9b7ab84d55ff589745755b95cd97f4ca8cf75'
               ,GETDATE()
               ,0
               ,1
               ,1
               ,''
               ,''
               ,'admin'
               ,GETDATE()
               ,'admin'
               ,GETDATE())
    
    set @i=@i+1
    end

    10000 条数据   用了3秒
    50000 条数据  21秒
    100000 条数据 42秒
    40000 条数据  16秒
    200000 条数据 1:37秒

  • 相关阅读:
    NC 5的开发环境起不了客户端
    NC 6系初始化EJB
    ubuntu安装javaweb
    html 优化
    ubuntu
    jquery
    前端优化
    京东设计中心
    html cookie
    html5 use video camera
  • 原文地址:https://www.cnblogs.com/25miao/p/7339400.html
Copyright © 2011-2022 走看看