# Install sqlbench with Homebrew

Measures and compares the execution time of one or more SQL queries. Version 1.1.0 via Homebrew; verified from local package data.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install sqlbench
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:sqlbench
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/sqlbench>
- **Version:** 1.1.0
- **Source summary:** Measures and compares the execution time of one or more SQL queries
- **Homepage:** <https://github.com/felixge/sqlbench>
- **Repository:** <https://github.com/felixge/sqlbench>
- **Upstream docs:** <https://github.com/felixge/sqlbench#readme>
- **License:** MIT
- **Source archive:** <https://github.com/felixge/sqlbench/archive/refs/tags/v1.1.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- sqlbench (cli)
- sqlbench (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.1.0
- Local data: ok
- Upstream repository: https://github.com/felixge/sqlbench
- Upstream latest detected: v1.1.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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


## Security Notes

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

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [bench](https://www.automicvault.com/pkg/brew/bench/) - Shares av.db curated category or tags: benchmarking, cli, developer-tools, performance.
- [dbmate](https://www.automicvault.com/pkg/brew/dbmate/) - Shares av.db curated category or tags: cli, database, developer-tools, postgresql, sql.
- [hyperfine](https://www.automicvault.com/pkg/brew/hyperfine/) - Shares av.db curated category or tags: benchmarking, cli, developer-tools, performance.
- [memtier_benchmark](https://www.automicvault.com/pkg/brew/memtier-benchmark/) - Shares av.db curated category or tags: benchmarking, cli, database, developer-tools.
- [multitime](https://www.automicvault.com/pkg/brew/multitime/) - Shares av.db curated category or tags: benchmarking, cli, developer-tools, performance.
- [pg-schema-diff](https://www.automicvault.com/pkg/brew/pg-schema-diff/) - Shares av.db curated category or tags: cli, database, developer-tools, postgresql, sql.
- [pg_top](https://www.automicvault.com/pkg/brew/pg-top/) - Shares av.db curated category or tags: cli, database, developer-tools, performance, postgresql.
- [pgbadger](https://www.automicvault.com/pkg/brew/pgbadger/) - Shares av.db curated category or tags: cli, database, developer-tools, performance, postgresql.

## Combined YAML source

View the package source record on GitHub. [combined/sqlbench.yml](https://github.com/automic-vault/db/blob/main/combined/sqlbench.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
