mysql mac win 性能测试_mysql性能测试

发现在查询时,去更新某一条记录时,那几分钟单次请求时间为900ms,估计mysql在重新建缓存和索引导致

2.1.2 1000张表,1万条数据测试

CREATE TABLE www_a_com_ (

beginip int(10) unsigned DEFAULT NULL,

endip int(10) unsigned DEFAULT NULL,

rrtype tinyint(4) DEFAULT NULL,

data varchar(256) DEFAULT NULL,

ttl int(10) unsigned DEFAULT NULL,

INDEX ipset_index (beginip,endip) USING BTREE,

INDEX rrtype_index (rrtype) USING BTREE

);

sql语句:select data,ttl from www_a_com_ where and beginip<=3232238968 and endip>=3232238968 and rrtype=1;

//使用缓存

SET GLOBAL key_buffer_size=200*1024*1024;

SET GLOBAL table_cache=1200;

SET GLOBAL thread_cache_size=60;

SET GLOBAL query_cache_size=200*1024*1024;

SET GLOBAL query_cache_limit=200*1024*1024;

SET GLOBAL table_definition_cache=1200;

SET GLOBAL thread_cache_size=60;

SET GLOBAL myisam_data_pointer_size=60;

SET GLOBAL delayed_queue_size=2000;

SET GLOBAL preload_buffer_size=65536;

加索引: INDEX `ipset_index` (`beginip`,`endip`) USING BTREE,

INDEX `rrtype_index` (`rrtype`) USING BTREE

打开缓存:1.5万qps,单次请求时间为1~3ms

不缓存: 3000qps,单次请求时间为6~7ms

服务器一分钟负载:2~4

测试时,发现在进程里启动10个连接和1一个连接的测试数据相差不大。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值