工具-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的资料还是比较少的。

posted on   Y.Debby  阅读(76)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示