# 使用 Homebrew 安装 sqlbench

查看 sqlbench 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:sqlbench
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sqlbench
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:sqlbench
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/sqlbench>
- **版本:** 1.1.0
- **来源摘要:** Measures and compares the execution time of one or more SQL queries
- **主页:** <https://github.com/felixge/sqlbench>
- **仓库:** <https://github.com/felixge/sqlbench>
- **许可证:** MIT
- **源码归档:** <https://github.com/felixge/sqlbench/archive/refs/tags/v1.1.0.tar.gz>
- **最后更新:** 2026-07-26T04:03:44+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- sqlbench (cli)
- sqlbench (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.1.0
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/felixge/sqlbench
- 检测到的最新版本: v1.1.0 (当前)
## 项目历史与用法

sqlbench is a Go command-line tool for measuring and comparing the execution time of SQL queries. Its README describes the main use case as benchmarking simple CPU-bound PostgreSQL query variants during local development.

### 项目历史

The repository was created in September 2020 and published an initial v1.0.0 release shortly afterward. A v1.1.0 release later that month added CI-built release binaries and baseline CSV comparison support.

### 采用历史

sqlbench was distributed through GitHub releases, source installation with Go, Chocolatey for Windows, and Homebrew for macOS users. The README explicitly documents Homebrew installation, which made it a familiar one-command install for package-manager-oriented PostgreSQL users.

### 使用方式

Users pass one or more `.sql` files to sqlbench, optionally set a PostgreSQL connection URL with `-c`, and choose iteration, duration, output CSV, baseline CSV, silent, verbose, and measurement-mode flags. By default it measures with `EXPLAIN (ANALYZE, TIMING OFF)`, while `-m client` measures client wall-clock time.

### 为什么软件包爱好者会关心

Package nerds care about sqlbench because it is a focused benchmarking executable that turns query comparisons into reproducible terminal output and CSV artifacts. It also captures the practical packaging taste of small Go tools: install from releases, Go source, Chocolatey, or Brew, then wire into local performance experiments.

### 时间线

- 2020: GitHub repository created.
- 2020: v1.0.0 initial release published.
- 2020: v1.1.0 release published binaries and added CSV baseline comparison.
- 2021: Repository last pushed according to GitHub metadata while remaining available through package managers.

### Related projects

- The README ties sqlbench to PostgreSQL, pgx connection handling, libpq-style PostgreSQL environment variables, and Homebrew and Chocolatey package channels.

### 来源

- <https://api.github.com/repos/felixge/sqlbench>
- <https://api.github.com/repos/felixge/sqlbench/releases>
- <https://github.com/felixge/sqlbench#readme>
- source_facts.package-manager


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** sqlbench
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [sql-lint](https://pkg.so/zh-hans/brew/sql-lint/) - Shares pkgdb curated category or tags: cli, database-tools, developer-tools, postgresql, sql.
- [multitime](https://pkg.so/zh-hans/brew/multitime/) - Shares pkgdb curated category or tags: benchmarking, cli, developer-tools, performance.
- [bench](https://pkg.so/zh-hans/brew/bench/) - Shares pkgdb curated category or tags: benchmarking, cli, developer-tools, performance.
- [pyperformance](https://pkg.so/zh-hans/brew/pyperformance/) - Shares pkgdb curated category or tags: benchmarking, cli, developer-tools, performance.
- [siege](https://pkg.so/zh-hans/brew/siege/) - Shares pkgdb curated category or tags: benchmarking, cli, developer-tools.
- [pspg](https://pkg.so/zh-hans/brew/pspg/) - Shares pkgdb curated category or tags: cli, database-tools, developer-tools, postgresql.
- [minio-warp](https://pkg.so/zh-hans/brew/minio-warp/) - Shares pkgdb curated category or tags: benchmarking, cli, developer-tools.
- [sql-migrate](https://pkg.so/zh-hans/brew/sql-migrate/) - Shares pkgdb curated category or tags: cli, database-tools, developer-tools, sql.
- [sql-translator](https://pkg.so/zh-hans/brew/sql-translator/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, database, database-tools, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/sqlbench.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sqlbench.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
