qileilove

          blog已經轉移至github,大家請訪問 http://qaseven.github.io/

          SQL數據庫性能測試,插入數據

          SQL Server中,測試插入大量數據,執行時間。
          declare @begin_date datetime
          declare @end_date datetime
          select @begin_date = getdate()
          declare @counter int
          set @counter=0
          while(@counter < 1000000)
          begin
          INSERT INTO testsql.dbo.Errorlog VALUES(''+@counter+'','b','c','d','e','f')
          set @counter=@counter + 1
          end
          select @end_date = getdate()
          select datediff(ms,@begin_date,@end_date) as '用時/毫秒'
          --1====3
          --10====3
          --100===20
          --1000===300
          --10000===2490
          --100000===30000
          --1000000===328936
          --10000000===
          --29513
          --31416
          --30066
          --30066
          --31326
          declare @begin_date datetime
          declare @end_date datetime
          select @begin_date = getdate()
          select COUNT(tid) from errorlog
          select @end_date = getdate()
          select datediff(ms,@begin_date,@end_date) as '用時/毫秒'

          posted on 2014-01-06 14:02 順其自然EVO 閱讀(189) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2014年1月>
          2930311234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 沅陵县| 阳谷县| 东乌珠穆沁旗| 福贡县| 宁蒗| 武功县| 阳朔县| 延庆县| 黑山县| 广西| 天长市| 崇阳县| 福鼎市| 祁东县| 灵山县| 上饶县| 宜宾市| 龙岩市| 长沙市| 甘洛县| 孟津县| 丹江口市| 吉林省| 丰原市| 翁源县| 呼伦贝尔市| 尚志市| 石泉县| 阳原县| 商南县| 香河县| 正阳县| 米脂县| 扎兰屯市| 达州市| 景泰县| 香河县| 平定县| 宜昌市| 安阳市| 海口市|