Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mysql中行锁的基准测试_Mysql_Benchmarking_Amazon Aurora - Fatal编程技术网

mysql中行锁的基准测试

mysql中行锁的基准测试,mysql,benchmarking,amazon-aurora,Mysql,Benchmarking,Amazon Aurora,我正在尝试使用select..for update语句对sql事务进行基准测试,该语句对行使用独占锁,然后将行插入另一个表中,如下所示 START TRANSACTION; SELECT CurrentSize FROM testtable WHERE id = {id} FOR UPDATE; -- update current size in testtable UPDATE testtable SET currentsize = curr

我正在尝试使用select..for update语句对sql事务进行基准测试,该语句对行使用独占锁,然后将行插入另一个表中,如下所示

START TRANSACTION;

    SELECT CurrentSize
    FROM testtable
    WHERE id = {id} FOR UPDATE;

    -- update current size in testtable
    UPDATE testtable
    SET currentsize = currentsize + 1
    WHERE id = {id} ;
    -- insert into a different table
    insert into testtable2 values(1,2);
 COMMIT;
我在上述交易中获得了2K tps,我假设每个交易需要0.5ms才能完成,因此我获得了2K tps

甚至可以将系统扩展到这一点之外吗?如果是的话,是否有任何我可以尝试使用的实现

我使用的是AWS RDS Aurora MySQL的一台16倍大的机器