# 使用 Homebrew 安装 sqlbench

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sqlbench
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:sqlbench
- **软件包管理器:** Homebrew
- **版本:** 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>
- **最后更新:** 2026-07-26T04:03:44+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sqlbench (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.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


## 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
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
