对比mysql一般引擎与infobright

1.mysql与infobirght的配置
采用虚拟机:
mysql:10.28.174.74 10.28.174.237
内存: 4g 3g
cpu:双核 cpu MHz : 3309.71
2.测试程序python

#! /usr/bin/env python
#coding=utf-8
##################################
import MySQLdb,time,datetime

#建立和数据库系统的连接
#conn_src = MySQLdb.connect(host='10.28.174.237', user='root',passwd='123456',db='moblepush',port=3307)
conn_src = MySQLdb.connect(host='10.28.174.74', user='test',passwd='123456',db='mobilepush',port=3306)
#获取操作游标
cursor_src = conn_src.cursor()
cursor_src.execute("set autocommit = 1")
count_num_sql='''select count(1) t from fact_app_market_pin_plat '''
con_sql='''where ( browse_top5=654 OR browse_top1=830 OR browse_top2=830 OR
browse_top3=830 OR browse_top4=830 OR browse_top5=830 OR
browse_top1=654 OR browse_top2=654 OR browse_top3=654 OR
browse_top4=654 ) '''
fetch_data_sql='''select s_o_memberid from fact_app_market_pin_plat '''
print "----start time:"+datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")
cursor_src.execute(count_num_sql+con_sql)
result = cursor_src.fetchone()
print "----end time:"+datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")
total=result[0]
print "----start time:"+datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")
pageSize=50000
for start in range(0,total,pageSize):
print "exec start"+str(start)+datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")
cursor_src.execute(fetch_data_sql+con_sql+" limit "+str(start)+","+str(pageSize))
cursor_src.fetchone()
print "----end time:"+datetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000")
conn_src.close();

3.测试数据700w左右结果1:
infobright:
 
----start time:Tue, 23 Jul 2013 13:51:02 +0000
----end time:Tue, 23 Jul 2013 13:51:04 +0000
----start time:Tue, 23 Jul 2013 13:51:04 +0000
exec start0Tue, 23 Jul 2013 13:51:04 +0000
exec start50000Tue, 23 Jul 2013 13:51:05 +0000
exec start100000Tue, 23 Jul 2013 13:51:06 +0000
exec start150000Tue, 23 Jul 2013 13:51:07 +0000
exec start200000Tue, 23 Jul 2013 13:51:09 +0000
----end time:Tue, 23 Jul 2013 13:51:11 +0000

mysql:

----start time:Tue, 23 Jul 2013 13:51:32 +0000
----end time:Tue, 23 Jul 2013 13:51:42 +0000
----start time:Tue, 23 Jul 2013 13:51:42 +0000
exec start0Tue, 23 Jul 2013 13:51:42 +0000
exec start50000Tue, 23 Jul 2013 13:51:44 +0000
exec start100000Tue, 23 Jul 2013 13:51:49 +0000
exec start150000Tue, 23 Jul 2013 13:51:55 +0000
exec start200000Tue, 23 Jul 2013 13:52:04 +0000
----end time:Tue, 23 Jul 2013 13:52:12 +0000

从结果得出:
[table]
||||mysql || infobright
||count:|| 10s || 2s
||fetch_data(20w左右分页5w):||30s || 7s
[/table]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值