Promptlight logo
Menu

Prompt template

SQL Query Reviewer

Review a SQL query for correctness, performance, concurrency risk, and safer verification before it reaches production.

engineering
database
code-review
Review this SQL query for an authorized database.

Inputs:
- Query: [SQL]
- Database engine and version: [ENGINE]
- Relevant schema, indexes, constraints, and row counts: [CONTEXT]
- Intended result and workload: [EXPECTED BEHAVIOR]
- Explain plan, if available: [PLAN]

Check semantic correctness, null behavior, joins, cardinality, filtering, ordering, pagination, index use, transaction behavior, locking, parameterization, and the risk of unbounded reads or writes.

Return:
1. What the query appears to do
2. Correctness findings
3. Performance and concurrency findings
4. A revised query only when evidence supports it
5. Explain or validation commands to run
6. Safe test cases, including edge data

Separate facts visible in the input from hypotheses that require a real execution plan. Never claim an optimization is faster without measurements.

Usage notes

Context, setup, and extra guidance for this prompt.

Customization tips

Turn this into a reusable workflow, not a one-off prompt

  • Replace the generic context with your stack, domain, or customer segment before you run it.
  • Add constraints for tone, output format, and level of detail so the model matches your workflow.
  • Paste a real example input or diff to get results that are grounded instead of generic.
Published July 20, 2026

Want to save this prompt for later?

Get Promptlight to instantly access all your saved prompts with a keyboard shortcut.

Launch, find, and reuse a prompt without leaving your flow

Open Promptlight with a shortcut, search your local Markdown library, then copy the right prompt into any AI tool. These are real screens from the Mac app.

Search mode

Find the right prompt in milliseconds.

Switch via Promptlight icon or ⇧ + Tab

  • Fuzzy search across titles and body text.
  • Favorites and file paths at a glance.
  • Keyboard-first: ↑↓ to navigate, ⏎ to copy.

A prompt library that fits how you already work

Promptlight combines fast local search, portable Markdown storage, and optional enhancement so your best prompts stay useful instead of getting lost in chats.

Lightning-Fast Search

Fuzzy search through your prompts instantly. Find what you need in milliseconds with intelligent matching.

Enhancer Mode

Rewrite a draft after you find it, so saved prompts and rough notes become clearer and easier to reuse.

Keyboard-First Workflow

Every action in Promptlight is keyboard-first. Launch with a shortcut, browse with a shortcut, copy with a shortcut.

Local Prompt Files

Your prompt vault can stay on your Mac as files you control, instead of being stored in another hosted workspace by default.

Edit with Any App

Your prompts are plain Markdown files. Edit them in VS Code, Obsidian, or any editor, and Promptlight picks up the saved changes.

Favorite Prompts

Mark your favorite prompts to pin them for quick access. No need to search for them every time.

Get Started Today

Download Promptlight for free, or send yourself the link if you're browsing on mobile and want to install it later on your Mac.

Download for macOS

Version 1.2.5 • 17.6 MB • macOS 10.13 (High Sierra) or later