zoukankan      html  css  js  c++  java
  • Oracl 10G与sql server2005搜索运行时间测试

    Oracle 10G与sql server2005搜索运行时间测试

    初学Oracle感觉它功能很强大,

       但总感觉oracle查询数据,添加数据都比sql server慢

     一下是测试环境:

     

    操作系统  

    Microsoft Windows XP Professional

     

    CPU 类型  

    Intel(R) Celeron(R) CPU E3200 @ 2.40GHz

    DualCore , 2433 MHz (12 x 203)

     

    内存:

    DDR3 2G

    oracle第三方工具:  plsql developer(F5) Toad (Ctrl+E)

    测试的数据 51万多条数据
     CID (编号)
    companyname(公司名称)   
    Ctelephone (电话)
     Phonetype  (电话类型)
     companyinfo (公司地址相关信息) 

    Rdatetime 
     booleanstate

    第一条测试语句

     搜索包含“武大”的地址信息

    select  * from dbo.total where  companyname like '%武大%'

    sqlserver2005测试语句

    代码
    declare @starttime as datetime; declare @endtime as datetime; set @starttime = getdate();
     select * from dbo.total where companyinfo like '%武大%' set @endtime = getdate();
     select @starttime as 开始时间,@endtime as 结束时间,datediff(MS,@starttime,@endtime)as 运行时间

     运行的结果: 4.5秒左右:

     

     

    Oracle执行

       

    Set timing on;
    select * from dbo.total where companyname like '%武大%'

    运行时间 18.5秒左右:

     第二次多条语句搜索

    sql server代码

    declare @starttime as datetime;

    declare @endtime as datetime;

    set @starttime = getdate();

    select * from dbo.total where companyinfo like '%华乐商务中心%'

    select * from dbo.total where companyinfo like '%联合国际%'

    select * from dbo.total where companyinfo like '%金丰大厦%'

    select * from dbo.total where companyinfo like '%光谷国际%'

    select * from dbo.total where companyinfo like '%国际商务大厦%'

    set @endtime = getdate();select @starttime as 开始时间,@endtime as 结束时间,datediff(MS,@starttime,@endtime)as 运行时间

     

      执行的时间与17秒左右

    Sql/Plus命令中执行

    执行的时间与39秒左右

    Executed in 10.906 seconds

    Executed in 5.078 seconds

    Executed in 10.218 seconds

    Executed in 10.218 seconds

    Executed in 3.141 seconds

    在进程中sql server和 oracle占用内存 都是200M左右!

    从结果可以看出50多万数据中 sql server明显速度优势大于Oracle

     

  • 相关阅读:
    使用VideoView开发视频总结
    后台接口向数据库录入汉字时乱码以及自动过滤文字经验总结
    8 Crash Reporting Tools For iOS And Android Apps
    Best Mobile Crash Reporting Software
    How do I obtain crash-data from my Android application?
    ACRA (Automated Crash Reporting for Android)
    Debugging Neural Networks with PyTorch and W&B
    OpenPose MobileNet V1
    Real-time-human-pose-estimation-by-pytorch
    openpose-pytorch
  • 原文地址:https://www.cnblogs.com/and/p/1710363.html
Copyright © 2011-2022 走看看