【SQL】SQL数据库性能测试,插入数据
2013-10-25 15:17
99 查看
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 '用时/毫秒'
相关文章推荐
- sql大数据插入之性能改善
- YDB与spark SQL在百亿级数据上的性能对比测试
- YDB与spark SQL在百亿级数据上的性能对比测试
- 使用JDBC插入大量数据的性能测试
- SQL语句创建表并插入指定N条数据(用于测试)
- YDB与spark SQL在百亿级数据上的性能对比测试
- 插入N条测试数据SQL语句
- Sql语句与存储过程查询数据的性能测试实现代码
- YDB与spark SQL在百亿级数据上的性能对比测试
- DataAdapter和SqlBulkCopy的插入性能测试
- SQL批量数据导入,性能测试
- sql循环插入测试数据
- 百万数据下几种SQL性能测试
- sql语句插入百万测试数据
- YDB与spark SQL在百亿级数据上的性能对比测试
- Delphi 操作SQL 插入一万条数据 三种方式速度测试
- 大数据应用之HBase数据插入性能优化之多线程并行插入测试案例
- SQL语句创建表并插入指定N条数据(用于测试)
- Sql语句与存储过程查询数据的性能测试实现代码
- YDB与spark SQL在百亿级数据上的性能对比测试