- 调整SqlIdFactory实现,使用类全路径名作为sqlId标识
- 调整BeetlSQL+SpringBoot集成方式,支持SpringBoot3
- 新增MyBatis-Flex,EasyQuery 俩款ORM工具性能测试
maven
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetlsql</artifactId>
<version>3.23.7-RELEASE</version>
</dependency>
BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据访问框架,它适用范围广,定制性强,写起数据库访问代码特别顺滑,不亚于 MyBatis。你不想写 SQL 也好,或者想更好地写 SQL 也好,BeetlSQL 都能满足这要求,目前支持的数据库如下
- 传统数据库:MySQL (包括支持 MySQL 协议的各种数据库), MariaDB ,Oralce ,Postgres (包括支持 Postgres 协议的各种数据库), DB2 , SQL Server ,H2 , SQLite , Derby ,神通,达梦,华为高斯,人大金仓,PolarDB,GBase8s,GreatSQL 等
- 大数据:HBase,ClickHouse,Cassandar,Hive,GreenPlum
- 物联网时序数据库:Machbase,TD-Engine,IotDB
- SQL 查询引擎:Drill,Presto,Druid
- 内存数据库:ignite,CouchBase
如下测试Score越大性能越好,包含了常用的 orm 操作: 多表联合查询映射(complexMapping),直接执行 sql (executeJdbc), 执行模板 sql (executeTemplate), 执行文件中的模板 sql ( File), 内置插入(insert),Query 调用链,翻页查询 (pageQuery), 内置主键查询 (selectById), one2Many 自动关联查询
Benchmark ModeCnt Score Error Units JMHMain.beetlsqlComplexMapping thrpt3 224.234 ± 551.444ops/ms JMHMain.beetlsqlExecuteJdbcthrpt3 504.526 ± 208.228ops/ms JMHMain.beetlsqlExecuteTemplatethrpt3 434.031 ± 110.087ops/ms JMHMain.beetlsqlFile thrpt3 428.368 ± 235.069ops/ms JMHMain.beetlsqlGetAll thrpt3 3.023 ± 3.741ops/ms JMHMain.beetlsqlLambdaQuerythrpt3 259.796 ±37.421ops/ms JMHMain.beetlsqlOne2Many thrpt3 120.713 ±68.157ops/ms JMHMain.beetlsqlPageQuerythrpt3 202.702 ±92.875ops/ms JMHMain.beetlsqlSelectById thrpt3 423.833 ± 204.166ops/ms JMHMain.easyQueryComplexMappingthrpt360.562 ± 238.406ops/ms JMHMain.easyQueryExecuteJdbc thrpt3 656.139 ± 162.165ops/ms JMHMain.easyQueryGetAllthrpt3 9.028 ± 3.977ops/ms JMHMain.easyQueryLambdaQuery thrpt3 326.350 ± 280.253ops/ms JMHMain.easyQueryPageQuery thrpt3 132.464 ±91.686ops/ms JMHMain.easyQuerySelectByIdthrpt3 292.797 ± 324.954ops/ms JMHMain.flexGetAll thrpt3 0.910 ± 0.503ops/ms JMHMain.flexPageQuerythrpt365.606 ± 402.289ops/ms JMHMain.flexSelectById thrpt3 218.314 ± 152.861ops/ms JMHMain.jdbcExecuteJdbcthrpt31081.216 ± 225.041ops/ms JMHMain.jdbcGetAll thrpt313.381 ± 2.713ops/ms JMHMain.jdbcSelectById thrpt31077.471 ± 197.462ops/ms JMHMain.jpaExecuteJdbc thrpt3 104.056 ± 301.241ops/ms JMHMain.jpaExecuteTemplate thrpt3 130.304 ± 168.880ops/ms JMHMain.jpaGetAllthrpt3 0.552 ± 0.260ops/ms JMHMain.jpaInsertthrpt363.933 ± 359.824ops/ms JMHMain.jpaOne2Manythrpt399.006 ±87.633ops/ms JMHMain.jpaPageQuery thrpt3 116.191 ± 191.231ops/ms JMHMain.jpaSelectByIdthrpt3 319.718 ± 129.206ops/ms JMHMain.mybatisComplexMappingthrpt3 106.319 ±28.726ops/ms JMHMain.mybatisExecuteTemplate thrpt3 222.515 ± 252.383ops/ms JMHMain.mybatisFilethrpt3 171.852 ± 188.859ops/ms JMHMain.mybatisGetAllthrpt3 1.183 ± 0.142ops/ms JMHMain.mybatisLambdaQuery thrpt310.197 ±17.721ops/ms JMHMain.mybatisPageQuery thrpt366.245 ±53.023ops/ms JMHMain.mybatisSelectByIdthrpt3 205.925 ± 481.288ops/ms JMHMain.woodExecuteJdbcthrpt3 378.089 ± 124.102ops/ms JMHMain.woodExecuteTemplatethrpt3 408.150 ± 172.513ops/ms JMHMain.woodFile thrpt3 426.547 ± 182.839ops/ms JMHMain.woodGetAll thrpt3 1.100 ± 0.729ops/ms JMHMain.woodLambdaQuerythrpt3 402.107 ± 159.309ops/ms JMHMain.woodPageQuerythrpt3 247.074 ± 132.585ops/ms JMHMain.woodSelectById thrpt3 395.659 ±39.505ops/ms
阅读文档 源码和例子 在线体验 多库使用 性能测试