mysql与orancl_mysql和postgresql性能对比测试

今天突然想知道mysql和postgresql的性能哪个好些

搜索看了一些文章,然后看到一篇专业的测试文章

对比测试的环境如下

电脑配置

Hardware Resources

CPU: Intel(R) Pentium(R) D CPU 3.00GHz Dual Core

RAM: 3G Ram

HDD: WDC WD3200AAJS-0

测试安装的软件

Software Resources

Debian Lenny 5.0 64 bit arch

Linux painkiller 2.6.26-2-amd64 #1 SMP Wed May 13 15:37:46 UTC 2009 x86_64 GNU/Linux

MySQL 5.0.51a-24+lenny1

MySQL 5.1.30 Sun compiled

InnoDB 1.0.3 Plugin compiled by ORACLE for MySQL 5.1.30

PostgreSQL 8.3.7

osdb2.1 – Opensource Database benchmark.

使用osdb生成了1024m的数据来测试

The test was made on a 1024MB of data and the multiple users test was made with 100 users simultaneously on the same database.

截取一部分测试结果大家看

SQL Operation

MySQL 5.0.51

MySQL 5.1.30 with InnoDB 1.0.3

PostgreSQL

seconds

seconds

seconds

sel_1_cl()

0

0.02

0.04

join_3_cl()

0.06

0.05

0.02

sel_100_ncl()

0.01

0.01

0.03

table_scan()

10.54

4.13

0.64

oin_2()

1.78

1.62

0.89

sel_variable_select_low()

0.03

0.02

0

sel_variable_select_high()

12.52

7.82

49.51

join_4_cl()

0

0

0

proj_100()

7.13

7.35

149.97

join_4_ncl()

0.03

0

0

proj_10pct()

9.13

2.68

20.06

table_scan()

select * from uniques where col_int = 1

sel_1_cl()

select col_key, col_int, col_signed, col_code, col_double, col_name from updates where col_key = 1000

sel_1_ncl()

select col_key, col_int, col_signed, col_code, col_double, col_name from updates where col_code = ‘BENCHMARKS’

sel_100_cl()

select col_key, col_int, col_signed, col_code, col_double, col_name from updates where col_key <= 100

sel_100_ncl()

select col_key, col_int, col_signed, col_code, col_double, col_name from updates where col_int <= 100

sel_variable_select_high()

select col_key, col_int, col_signed, col_code, col_double, col_name from tenpct where col_signed < :prog_var;

sel_variable_select_low()

select col_key, col_int, col_signed, col_code, col_double, col_name from tenpct where col_signed < :prog_var;

join_4_cl()

select uniques.col_date, hundred.col_date, tenpct.col_date, updates.col_date from uniques, hundred, tenpct, updates where uniques.col_key = hundred.col_key and uniques.col_key = tenpct.col_key and uniques.col_key = updates.col_key and uniques.col_key = 1000

join_4_ncl()

select uniques.col_date, hundred.col_date, tenpct.col_date, updates.col_date from uniques, hundred, tenpct, updates where uniques.col_code = hundred.col_code and uniques.col_code = tenpct.col_code and uniques.col_code = updates.col_code and uniques.col_code = ‘BENCHMARKS’

sel_variable_select_high()

select col_key, col_int, col_signed, col_code, col_double, col_name from tenpct where col_signed < :prog_var;

sel_variable_select_low()

select col_key, col_int, col_signed, col_code, col_double, col_name from tenpct where col_signed < :prog_var;

----------------------------------------------------------------------------------------------------------------------------------------------------------

在一些常规的根据表的键查询MySQL 5.1.30 with InnoDB 1.0.3居然还快过postgresql

sel_1_cl()

select col_key, col_int, col_signed, col_code, col_double, col_name from updates where col_key = 1000

但是表扫描就要慢了

table_scan()

select * from uniques where col_int = 1

可见mysql也不是被postgresql比的一无是处

大家可以再研究下对比结果

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值