0
点赞
收藏
分享

微信扫一扫

benchmarksql详解及支持mysql、达梦、citus的lightdb benchmarksql分支

王老师说 2022-12-10 阅读 71


  为什么使用benchmarksql压测?因为大多数应用系统使用java开发,并且不使用存储过程,故使用benchmarksql压测数据库最公平,既可以测试数据库,也可以测试JDBC驱动。

  可以用来测试EnterpriseDB, PostgreSQL, Oracle, Sybase, SQLSvr, MySQL, HsqlDB, Derby/JavaDB & FireBird。

  其模型ER关系图如下:

  

benchmarksql详解及支持mysql、达梦、citus的lightdb benchmarksql分支_sql

   共有5个事务组成,分别如下:

benchmarksql详解及支持mysql、达梦、citus的lightdb benchmarksql分支_sql_02

This schema is used by 5 different transactions that produce a variety of different access patterns on the tables.

  • Item is read only.
  • WarehouseDistrictCustomer and Stock are read/write.
  • New-Order is insert, read and delete, like a queue that at any given time has approximately W * 9000 rows in it.
  • Order and Order-Line receive inserts and every row inserted will have a time delayed update to it, after which the row becomes stale and may be read infrequently in the future.
  • History is insert only.

    在分布式版本中,item和config表适合作为广播表,其他表跟着warehouse的分片走。

4个SELECT,3个INSERT,2个UPDATE组成,和在微服务中不用匿名块和存储过程实现的逻辑高度匹配。具体可见​​http://tpc.org/tpc_documents_current_versions/pdf/tpc-c_v5.11.0.pdf​​ 108页。

一般来说当数据库大小超过数据库共享缓存的3倍后,性能就会开始明显的下降。

  虽然国内生产实践中已经很少使用外键约束,但是benchmarksql的实现,仍然广泛的采用了外键约束以符合TPC-C的要求。

  注:benchmarksql原生不支持mysql,​​https://github.com/hslightdb/benchmarksql​​​增加了一个支持mysql的版本,同时在此基础上增加了对postgresql citus分布式、tpch for citus(60%默认失败)、达梦数据库的支持。​​pgsql-io​​维护的是linux的​​原地更新模式​​。

 


举报

相关推荐

0 条评论