最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

InvestigationreportofMSSQLdatareadandwriteperformance

来源:动视网 责编:小采 时间:2020-11-09 15:12:48
文档

InvestigationreportofMSSQLdatareadandwriteperformance

InvestigationreportofMSSQLdatareadandwriteperformance:MSSQL 2008 CPU Xeon E5 2G (12 CORE ) X 2 RAM 128G case 1: while @i1,000,000 begin Insert into T1( column1, column2, column3, ... column34) values( @i, getdate(), rand()*getdate, ... ...) endTest result : 1,000,000 rows time: 00:04:28 size
推荐度:
导读InvestigationreportofMSSQLdatareadandwriteperformance:MSSQL 2008 CPU Xeon E5 2G (12 CORE ) X 2 RAM 128G case 1: while @i1,000,000 begin Insert into T1( column1, column2, column3, ... column34) values( @i, getdate(), rand()*getdate, ... ...) endTest result : 1,000,000 rows time: 00:04:28 size


MSSQL 2008 CPU Xeon E5 2G (12 CORE ) X 2 RAM 128G case 1: while @i1,000,000 begin Insert into T1( column1, column2, column3, ... column34) values( @i, getdate(), rand()*getdate, ... ...) endTest result : 1,000,000 rows time: 00:04:28 size

MSSQL 2008

CPU Xeon E5 2G (12 CORE ) X 2

RAM 128G

case 1:

while @i<1,000,000
begin
Insert into T1(
column1,
column2,
column3,
...
column34) values(
@i,
getdate(),
rand()*getdate,
...
...)
endTest result : 1,000,000 rows time: 00:04:28 size 503MBcase 2:insert into T1 select * from T1Test result : 1,000,000 rows insert to Table(1,000,000 rows exist) time: 00:00:51

case 3:
select * into NewTableName from T1Test result : 2,000,000 rows insert to NewTable time: 00:00:22
select * into TableName from T1Test result : 2,000,000 rows insert to TableName(2,000,000 rows exist) time: 00:01:00

case 4:
Tmp(20,000,000 rows) Target ( 20,000,000 rows)
Open 10 threads run this sql in same time
insert into Target select * from TmpTest result : 2,000,000X10 rows insert to Target(20,000,000 rows exist) time: 04:29:00

case 5:

cmd>bcp T1 out t1.dat -f bcp.Xml -T -d database
Test result : 20,000,000 rows export to t1.dat time: 00:00:20

cmd>bcp Target in t1.dat -f bcp.Xml -T -d database
Test result : 20,000,000 rows import from t1.dat to Target(500,000,000 rows exist ) time: 00:50:01

case 6:

bcp import 20,000,000 X 2 rows use 2 thread to same blank table

cmd>bcp Target in t1.dat -f bcp.Xml -T -d database

Test result : thread 1 time: 00:08:35 speed :38761 rows/sec ; thread 2 time: 00:07:37 speed: 87359 rows/sec

case 7:

bcp export 639,160,000 rows to a file

cmd>bcp Target out target.dat -f bcp.Xml -T -d database

Test result : time : 01:24:17 speed: 126,380 rows/sec

case 8:

bcp import 639,160,000 rows to target table

cmd>bcp Target in target.dat -f bcp.Xml -T -d database

Test result : Very slow, canceled.

case 9:

use bulk insert clause to import 20,000,000 rows to target table ( 0,000,000 rows exist )

bulk insert Target from 'tmp.dat' with (formatfile = 'bcp.Xml', tablock)
Test result: time : 01:33:06 ( compare with case 5 )

大家有更快的方案可以分享一下吗?

文档

InvestigationreportofMSSQLdatareadandwriteperformance

InvestigationreportofMSSQLdatareadandwriteperformance:MSSQL 2008 CPU Xeon E5 2G (12 CORE ) X 2 RAM 128G case 1: while @i1,000,000 begin Insert into T1( column1, column2, column3, ... column34) values( @i, getdate(), rand()*getdate, ... ...) endTest result : 1,000,000 rows time: 00:04:28 size
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top