工具-sqlbench
sqlbench有两种,一个支持oltp测试,一个支持查询语句对比的。
https://github.com/felixge/sqlbench这个是支持查询语句对比的github。
安装
在这里下载 https://github.com/felixge/sqlbench/releases 安装的时候如下报错: go build go: github.com/jackc/pgx/v4@v4.8.1: Get "https://proxy.golang.org/github.com/jackc/pgx/v4/@v/v4.8.1.mod": dial tcp 142.251.42.241:443: i/o timeout go: downloading github.com/montanaflynn/stats v0.6.3 go: downloading github.com/olekukonko/tablewriter v0.0.4 go: downloading github.com/jackc/pgx/v4 v4.8.1 go: github.com/jackc/pgx/v4@v4.8.1: Get "https://proxy.golang.org/github.com/jackc/pgx/v4/@v/v4.8.1.mod": dial tcp 142.251.42.241:443: i/o timeout 搜了一下,可以调整一下go proxy代理,详见-》https://blog.csdn.net/m0_67393413/article/details/126100779,亲测可行: go env -w GOPROXY=https://goproxy.cn,direct go env -w GOSUMDB=off go env -w GOSUMDB=sum.golang.google.cn
本来想用于mysql测试的,然后github 的readme显示:
Only PostgreSQL is supported at this point, but pull requests for MySQL or other databases are welcome.
放弃吧。但功能是挺好的,要是支持mysql就很完美了。
支持sql之间的对比。

有时间可以研究一下源码。
这个是postgreSQL的测试示例,https://blog.csdn.net/weixin_44519342/article/details/122827534
sqlbench的资料还是比较少的。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律