
【深圳】源创会:5.26下午、轰趴馆等你”

BeetlSQL 研发自 2015 年,核心和生态扩展全部自研。目标是提供开发高效,维护高效,运行高效的数据访问框架,它适用范围广,定制性强,入门快。
阅读文档 源码和例子 在线体验 多库使用 性能测试 插件支持
本次调整:
- sql-accelerator 不支持泛型字段 · Issue #I9PPBH
- 【轻量级 PR】:注释错误 · Pull Request !164
- sql-accelerator 性能优化,selectById和selectAll内置方法优化,性能提升30%
- sql-jmh 新增ORM工具DBVisitor 的性能测试数据
最新测试结果,Score越大越好:
BeetlSQL (国产)
MyBatis-Plus (国产)
JPA(Spring Data)
JDBC (基准)
Wood (国产)
MyBatis-Flex (国产)
EasyQuery (国产)
DBVisitor (国产)
Benchmark Mode Cnt Score Error Units Beetl.addEntity thrpt 5 131.153 ± 36.755 ops/ms Beetl.complexMapping thrpt 5 241.160 ± 230.660 ops/ms Beetl.executeJdbcSql thrpt 5 283.492 ± 73.667 ops/ms Beetl.executeTemplateSql thrpt 5 261.751 ± 92.532 ops/ms Beetl.getAll thrpt 5 13.283 ± 1.476 ops/ms Beetl.getEntity thrpt 5 341.775 ± 87.817 ops/ms Beetl.lambdaQuery thrpt 5 178.291 ± 76.958 ops/ms Beetl.one2Many thrpt 5 182.116 ± 121.774 ops/ms Beetl.pageQuery thrpt 5 156.156 ± 61.772 ops/ms Beetl.sqlFile thrpt 5 263.121 ± 74.834 ops/ms DBVisitor.addEntity thrpt 5 100.069 ± 32.580 ops/ms DBVisitor.executeJdbcSql thrpt 5 182.828 ± 44.383 ops/ms DBVisitor.executeTemplateSql thrpt 5 3.198 ± 0.756 ops/ms DBVisitor.getAll thrpt 5 3.135 ± 0.618 ops/ms DBVisitor.getEntity thrpt 5 121.144 ± 34.588 ops/ms DBVisitor.lambdaQuery thrpt 5 96.125 ± 41.567 ops/ms DBVisitor.pageQuery thrpt 5 48.819 ± 15.258 ops/ms EasyQuery.addEntity thrpt 5 92.616 ± 36.392 ops/ms EasyQuery.complexMapping thrpt 5 63.627 ± 59.919 ops/ms EasyQuery.executeJdbcSql thrpt 5 233.435 ± 44.917 ops/ms EasyQuery.getAll thrpt 5 14.289 ± 1.803 ops/ms EasyQuery.getEntity thrpt 5 132.508 ± 66.459 ops/ms EasyQuery.lambdaQuery thrpt 5 134.101 ± 58.575 ops/ms EasyQuery.one2Many thrpt 5 70.632 ± 76.097 ops/ms EasyQuery.pageQuery thrpt 5 77.469 ± 48.158 ops/ms Flex.addEntity thrpt 5 83.676 ± 35.254 ops/ms Flex.getAll thrpt 5 2.841 ± 0.956 ops/ms Flex.getEntity thrpt 5 70.677 ± 41.386 ops/ms Flex.pageQuery thrpt 5 33.501 ± 28.323 ops/ms GeneralBeetl.addEntity thrpt 5 106.681 ± 41.071 ops/ms GeneralBeetl.complexMapping thrpt 5 221.872 ± 291.360 ops/ms GeneralBeetl.executeJdbcSql thrpt 5 145.154 ± 41.654 ops/ms GeneralBeetl.executeTemplateSql thrpt 5 134.640 ± 34.154 ops/ms GeneralBeetl.getAll thrpt 5 7.322 ± 1.034 ops/ms GeneralBeetl.getEntity thrpt 5 127.783 ± 41.652 ops/ms GeneralBeetl.lambdaQuery thrpt 5 107.401 ± 52.390 ops/ms GeneralBeetl.one2Many thrpt 5 123.169 ± 104.847 ops/ms GeneralBeetl.pageQuery thrpt 5 95.685 ± 37.589 ops/ms GeneralBeetl.sqlFile thrpt 5 133.986 ± 39.981 ops/ms Jdbc.addEntity thrpt 5 215.327 ± 228.142 ops/ms Jdbc.executeJdbcSql thrpt 5 704.882 ± 120.221 ops/ms Jdbc.getAll thrpt 5 34.915 ± 9.732 ops/ms Jdbc.getEntity thrpt 5 708.092 ± 121.573 ops/ms Jpa.addEntity thrpt 5 49.685 ± 84.597 ops/ms Jpa.executeJdbcSql thrpt 5 62.368 ± 56.983 ops/ms Jpa.executeTemplateSql thrpt 5 64.321 ± 64.992 ops/ms Jpa.getAll thrpt 5 4.970 ± 1.593 ops/ms Jpa.getEntity thrpt 5 56.314 ± 56.988 ops/ms Jpa.one2Many thrpt 5 96.373 ± 95.969 ops/ms Jpa.pageQuery thrpt 5 58.908 ± 42.332 ops/ms MyBatis.addEntity thrpt 5 41.215 ± 11.790 ops/ms MyBatis.complexMapping thrpt 5 101.919 ± 85.690 ops/ms MyBatis.executeTemplateSql thrpt 5 46.982 ± 8.396 ops/ms MyBatis.getAll thrpt 5 5.618 ± 1.167 ops/ms MyBatis.getEntity thrpt 5 43.790 ± 18.015 ops/ms MyBatis.lambdaQuery thrpt 5 24.296 ± 14.280 ops/ms MyBatis.pageQuery thrpt 5 15.815 ± 5.403 ops/ms MyBatis.sqlFile thrpt 5 44.577 ± 16.104 ops/ms Wood.addEntity thrpt 5 110.456 ± 44.699 ops/ms Wood.executeJdbcSql thrpt 5 133.508 ± 33.219 ops/ms Wood.executeTemplateSql thrpt 5 133.187 ± 39.569 ops/ms Wood.getAll thrpt 5 2.133 ± 0.456 ops/ms Wood.getEntity thrpt 5 135.654 ± 34.405 ops/ms Wood.lambdaQuery thrpt 5 131.672 ± 32.597 ops/ms Wood.pageQuery thrpt 5 230.682 ± 81.406 ops/ms Wood.sqlFile thrpt 5 136.683 ± 37.108 ops/ms
BeetlSQL 核心功能
BeetlSQL 核心 | 功能 |
sql-core | 核心包,封装了 JDBC 操作,SQL 文件管理,注解的注解管理 |
sql-fetch | 类似 Hibernate 那样提供 @Fetch,@FetchMany 等注解 |
sql-mapper | mapper 类定义和扩展,用户可以自定义自己的 mapper 和 mapper 的注解 |
sql-intergration | 整合 Spring,solon,jfinal 等框架,以及例子 |
sql-query | Query 和 LambdaQuery,用 Java API 构造和使用 SQL |
sql-mapping | 支持单表,多表与 POJO 的互相映射,支持 json 定义,xml 定义映射方式,或者约定习俗 |
sql-template | Beetl 模板实现,且支持其他模板语言 |
sql-gen | 代码生成抽象包,并提供默认实现可以生成 dao,sql 文件,md 文档 |
sql-db-support | 各种数据库的测试和验证,支持 33+ 数据库。 |
sql-samples | 包含了上百个使用 beetlsql 的例子 |
sql-test | 包含了上百个单元测试例子 |
BeetlSQL 最新扩展包
BeetlSQL 扩展包 | 功能 |
sql-xml | 高仿 myabtis 的 xml 语法,如果喜欢使用 xml 写 sql 模板的,可以使用此扩展包 |
sql-accelerator | 性能加速包,通过反射优化,缓存,让 beetlsql 性能提升 50%-200%,接近一半手写 JDBC 的性能 |
sql-firewall | sql 防火墙,避免不小心写的 sql 破坏数据库 |
sql-dynamic-table | 支持像访问静态表格那样防火动态表格,简化动态创建表格的业务需求开发 |
sql-bean-encrypt | 支持 @MD5 ,@AES 等对字段加密解密 |
sql-rewrite | 采用 sql 重写,支持单表多租户模式,逻辑删除,数据权限功能 |
SAGA(实验) | BeetSQL 的 SAGA 是实现,用 SAGA 微服务事务 |
使用加速扩展性能优化结果:能达到近一半手写 JDBC 的性能
查询 | 测试内容 | BeetlSQL(ops/ms) | 纯 jdbc | mybatis | JPA |
beetlsqlExecuteJdbc | 直接执行 JDBC | 318 | 678 | / | 64 |
beetlsqlExecuteTemplate | 执行 SQL 模板 | 268 | / | 44 | 66 |
beetlsqlFile | SQL 存放在文件统一管理 | 266 | / | 41 | / |
beetlsqlInsert | 插入一条 | 129 | 248 | 43 | 59 |
beetlsqlGetAll | 获取所有数据 | 13 | 40 | 4 | 5 |
beetlsqlLambdaQuery | Java 函数编写 SQL 执行查询 | 196 | / | 9 | / |
beetlsqlPageQuery | 翻页查询 | 159 | / | 17 | 59 |
beetlsqlSelectById | 查询一条 | 259 | 670 | 43 | 61 |
maven
<dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</artifactId> <version>3.30.6-RELEASE</version> </dependency>
BeetlSQL 支持如下数据库
- 传统数据库:MySQL (包括支持 MySQL 协议的各种数据库), MariaDB ,Oralce ,Postgres (包括支持 Postgres 协议的各种数据库), DB2 , SQL Server ,H2 , SQLite , Derby ,神通,达梦,华为高斯,人大金仓,PolarDB,GBase8s,GreatSQL 等
- 大数据:HBase,ClickHouse,Cassandar,Hive,GreenPlum,Doris,Oceanbase,ymatrix
- 物联网时序数据库:Machbase,TD-Engine,IotDB,Openplant
- SQL 查询引擎:Drill,Presto,Druid,Trino
- 内存数据库:ignite,CouchBase
插件支持
还没有评论,来说两句吧...