Skip to content
测试mysql合并插入的吞吐
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
common
LICENSE
README.md
composer.json

README.md

mysql合并插入性能测试

测试数据

Mysql合并插入可以带来*10的吞吐提升,而事务提交没有明显的收益。

下面是在一台普通MYSQL机型下的TPS实测数据:

[root@10-9-136-206 mysql-bulk-insert]# php app/webroot/index.php /mysql/bulk 1 100000 1000
0
42806.00914435
43227.90295967
43272.173662149
43692.726141519
44000.411228209
44212.535780412
44151.11284079
44052.568844545
43966.587535806
总耗时:2.2602601051331

[root@10-9-136-206 mysql-bulk-insert]# php app/webroot/index.php /mysql/single 1 100000 1000
0
2491.9398066076
2508.9623551623
2507.8489664453
2472.5595405806
2472.8026457754
2470.8333636471
2474.2125353628
2472.2627574325
2482.6912969641
总耗时:40.278048992157

[root@10-9-136-206 mysql-bulk-insert]# php app/webroot/index.php /mysql/tran 1 100000 1000
0
4836.6073969591
4657.2280431194
4636.0706949907
4642.2653099742
4693.948850678
4719.164523141
4763.7133827637
4819.8505302493
4849.5904714522
总耗时:20.423968076706

参考

brick/db

You can’t perform that action at this time.