# database_optimizer

database_optimizer — a subagent for Claude Code, Codex, and Cursor reviews database performance evidence and proposes optimizations. It ranks bottlenecks and outlines how to measure proposed changes.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 776 repo stars
- Author: AgenticOrgLab
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AgenticOrgLab/ExecOrchestra/tree/HEAD/execorchestra/Pool/resources/agents/database_optimizer.md
- Updated: 2026-11-12
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/agenticorglab-database-optimizer

## What it does

The subagent produces a database optimization report with ranked bottlenecks and suggestions for queries, indexes, schemas, configuration, and access patterns. Each proposed change comes with workload trade-offs, migration and rollback considerations, and capacity risks.

The input can include an optimization goal and database materials such as schemas, queries, execution plans, indexes, metrics, or health-check results. Those materials are optional. The agent must not fabricate execution plans, row counts, latency figures, or production topology. Database-specific assumptions and potentially destructive operations are marked in the report.

A benchmark plan covers before-and-after metrics and acceptance thresholds. Any suggested index or configuration change must explain its effect on the workload.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/database_optimizer.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/database_optimizer.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/database_optimizer.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/AgenticOrgLab/ExecOrchestra/tree/HEAD/execorchestra/Pool/resources/agents/database_optimizer.md

## When to use it
- rank bottlenecks across database queries and schemas
- weigh tuning options against workload trade-offs
- plan a migration with rollback considerations
- define benchmark metrics and acceptance thresholds

## Example prompts
- Review these database schemas and queries, then rank the performance bottlenecks.
- Draft optimization recommendations with workload trade-offs and rollback considerations.
- Create a benchmark plan for measuring the proposed database changes.

## Similar
- [database-optimizer](https://affpapa.org/en/nevibecode/agents/voltagent-database-optimizer.md) — subagent · ★ 6505 repo stars
- [database-cloud-optimization-database-optimizer](https://affpapa.org/en/nevibecode/agents/database-cloud-optimization-database-optimizer.md) — subagent · ★ 42780 repo stars
- [performance-optimizer](https://affpapa.org/en/nevibecode/skills/oakoss-performance-optimizer.md) — skill · 124 installs
- [postgresql-database-engineering](https://affpapa.org/en/nevibecode/skills/postgresql-database-engineering.md) — skill · 1800 installs
- [database-query-optimization](https://affpapa.org/en/nevibecode/skills/database-query-optimization.md) — skill · 594 installs
- [database-performance-debugging](https://affpapa.org/en/nevibecode/skills/database-performance-debugging.md) — skill · 500 installs

From the same set: [agenticorglab/execorchestra](https://affpapa.org/en/nevibecode/by/agenticorglab/execorchestra.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
