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

  官网:https://sourceforge.net/projects/benchmarksql/,github:官方文档https://benchmarksql.readthedocs.io/en/latest/

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

  可以用来测试EnterpriseDB, PostgreSQL, Oracle, Sybase, SQLSvr, MySQL, HsqlDB, Derby/JavaDB & FireBird(编译器使用yacc编写)。

  其模型ER关系图如下:

  

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

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的分片走。

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

  所以benchmarksql跑的时间越长,数据库也会越大。一般来说当数据库大小超过数据库共享缓存的3倍后,性能就会开始明显的下降。

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

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

  编译可参见 ant https://github.com/hslightdb/citus-benchmarksql/blob/master/HOW-TO-RUN.txt

  https://benchmarksql.readthedocs.io/en/latest/

posted @   zhjh256  阅读(1295)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2020-01-28 h2 web console使用
2020-01-28 LockSupport工具类详解
2019-01-28 java.lang.IllegalArgumentException: An invalid domain [.test.com] was specified for this cookie解决方法
2018-01-28 在JDBC中使用Java8的日期LocalDate、LocalDateTime
点击右上角即可分享
微信分享提示