偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

SQL Server 2005與Oracle 10g的"龜兔賽跑"

數(shù)據(jù)庫 SQL Server
SQL Server 2005在搜索運(yùn)行時(shí)間上對(duì)比Oracle 10g是本文的重點(diǎn),盡管測(cè)試環(huán)境是50萬數(shù)據(jù)級(jí),但也能看到一些端倪。

Oracle數(shù)據(jù)庫的應(yīng)用環(huán)境,一般來說比SQL Server要復(fù)雜,這也是大家形容Oracle與SQL Server是單反相機(jī)與傻瓜相機(jī)的區(qū)別。不過,傻瓜相機(jī)也有其好處,下面是作者的實(shí)際對(duì)比。

初學(xué)Oracle感覺它功能很強(qiáng)大,但總感覺Oracle查詢數(shù)據(jù),添加數(shù)據(jù)都比SQL Server慢。

一下是測(cè)試環(huán)境:

操作系統(tǒng)  

Microsoft Windows XP Professional

CPU 類型  

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

DualCore , 2433 MHz (12 x 203)

內(nèi)存:

DDR3 2G

Oracle第三方工具:  PL/SQL developer(F5) Toad (Ctrl+E)

測(cè)試的數(shù)據(jù) 51萬多條數(shù)據(jù)
CID (編號(hào))
companyname(公司名稱)   
Ctelephone (電話)
Phonetype  (電話類型)
companyinfo (公司地址相關(guān)信息) 

Rdatetime  
booleanstate

***條測(cè)試語句

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

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

SQL Server 2005測(cè)試語句

  1. declare @starttime as datetime;     
  2. declare @endtime as datetime;    
  3. set @starttime = getdate();   
  4. select * from dbo.total where  companyinfo like '%武大%'  set @endtime = getdate();   
  5. select @starttime as 開始時(shí)間,@endtime as 結(jié)束時(shí)間,datediff(MS,@starttime,@endtime)as  運(yùn)行時(shí)間 

 運(yùn)行的結(jié)果: 4.5秒左右:

 運(yùn)行結(jié)果

Oracle執(zhí)行

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

運(yùn)行時(shí)間 18.5秒左右:

運(yùn)行時(shí)間

第二次多條語句搜索

SQL Server代碼

  1. declare @starttime as datetime;     
  2. declare @endtime as datetime;    
  3. set @starttime = getdate();     
  4. select * from dbo.total where  companyinfo like '%華樂商務(wù)中心%'    
  5. select * from dbo.total where  companyinfo like '%聯(lián)合國際%'    
  6. select * from dbo.total where  companyinfo like '%金豐大廈%'    
  7. select * from dbo.total where  companyinfo like '%光谷國際%'    
  8. select * from dbo.total where  companyinfo like '%國際商務(wù)大廈%'    
  9. set @endtime = getdate();  
  10. select @starttime as 開始時(shí)間,@endtime as 結(jié)束時(shí)間,datediff(MS,@starttime,@endtime)as  運(yùn)行時(shí)間 

執(zhí)行后

執(zhí)行的時(shí)間與17秒左右

結(jié)果

Sql/Plus命令中執(zhí)行

執(zhí)行的時(shí)間與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

在進(jìn)程中SQL Server 2005和Oracle占用內(nèi)存 都是200M左右!

從結(jié)果可以看出50多萬數(shù)據(jù)中SQL Server 2005明顯速度優(yōu)勢(shì)大于Oracle 10g。

原文標(biāo)題:Oracl 10G與sql server2005搜索運(yùn)行時(shí)間測(cè)試

鏈接:http://www.cnblogs.com/and/archive/2010/04/12/1710363.html

【編輯推薦】

  1. SQL Server使用索引實(shí)現(xiàn)數(shù)據(jù)訪問優(yōu)化
  2. SQL Server數(shù)據(jù)庫優(yōu)化經(jīng)驗(yàn)總結(jié)
  3. 如何使用SQLServer數(shù)據(jù)庫查詢累計(jì)值
  4. 淺析Oracle和SqlServer存儲(chǔ)過程的調(diào)試、出錯(cuò)處理
  5. 幾段SQLServer語句和存儲(chǔ)過程
  6. 50種方法優(yōu)化SQL Server數(shù)據(jù)庫查詢

 

責(zé)任編輯:彭凡 來源: 博客園
相關(guān)推薦

2011-08-30 14:40:46

SQL Server Oracle 10gC#源碼程序

2010-09-08 08:44:30

SQL Server

2011-04-15 09:53:37

Oracle 10gSQL優(yōu)化

2009-10-20 18:32:25

Oracle 10g

2010-04-14 16:09:51

Oracle 10g歸

2011-08-17 14:41:12

Oracle 10g透SQL Server

2010-03-30 19:31:25

Oracle 10g

2011-03-25 16:10:58

oraclenagios

2011-05-13 11:21:51

linuxoracle 10g安裝

2011-08-17 15:13:47

Oracle 10g透SQL Server

2010-04-15 13:14:18

linux下Oracl

2011-03-29 09:56:48

Oracle數(shù)據(jù)庫10SQL

2010-04-07 09:39:18

Oracle 10G

2010-05-07 09:35:25

Oracle 10g

2009-04-27 13:26:41

Oracle 10gRAC鏈接錯(cuò)誤

2011-08-23 15:56:19

SQL Server Oracle 11g

2010-04-13 10:07:19

Oracle 10G

2009-11-19 10:32:41

Oracle 10g服

2010-02-05 09:06:14

Ubuntu Orac

2009-10-23 15:54:01

Oracle 10g序
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)