您的位置:首页 > 数据库 > MySQL

Mysql 在windows 2000和 hp-ux上性能 对比测试

2004-10-31 22:10 851 查看
小型机HP 9000/800
# uname -a
HP-UX uxserver B.11.11 U 9000/800 552756577 unlimited-user license
# ioscan -C disk
H/W Path     Class                   Description
================================================
0/0/1/1.2.0                  disk    FUJITSU MAJ3364MC
0/0/2/0.0.0                  disk    SEAGATE ST318404LC
0/0/2/0.2.0                  disk    FUJITSU MAJ3364MC
Hardware Model:          9000/800/L1000-44
2x PA 8600 CPU Module 3.1 440 MHz Physical Memory:         1024.9 MB OS Identification:       B.11.11 U
mysql-max-4.1.7-hp-hpux11.11-hppa2.0w-64bit.tar.gz
至强服务器
HP  ProLiant DL580 2x Xeon MP CPU 2.00GHz Hard Disk : COMPAQ LOGICAL VOLUME SCSI (203.5GB)
Memory : 2048MB
mysql-4.0.21-win-noinstall.zip
测试了以下的命令
插入
建表
查询
更新
索引
结论很奇怪,似乎hp-ux只在插入胜出,update差很多,而且索引的效果不明显
也许和mysql的版本有关,但我用的都是基本的命令,没有用到4.1版的新功能
上次没有得到CPU主频,内存容量等信息,现在看来 440Mhz vs 2000Mhz, 1G Bytes vs 2G Bytes
应该是可以体现它们的性能差别,还是Unix系统占优势

型号服务器小型机
命令行时间时间
create table huge(a varchar(32), b decimal(18,2));  
insert into huge values( 'abcdef1234567890abcdef1234567890','99999999.99');  
insert into huge select * from huge;(18次,共524288行,第18次)3.34    2.88
select count(*) from huge;00.02
select sum(b) from huge;1.632.19
create table huge2 select * from huge;6.976.15
update huge2 set b=rand(UNIX_TIMESTAMP() );14.4831.32
select count(*) from huge2 where b<0.5;(索引前)1.192.03
create index huge2_b on huge2(b);8.9528.88
select count(*) from huge2 where b<0.5;(索引后)0.892.09
create table opt(id bigint, v decimal(18,2));  
insert into opt (v) select b from huge2;4.094.25
update opt set id=rand(UNIX_TIMESTAMP() )*100000000;3.698.24
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息