# Inspect query plans before execution

> Use GRAPH.EXPLAIN to view query execution plans and validate index usage without running

- Skill: `falkordb/inspect-query-plans-before-execution` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add falkordb/inspect-query-plans-before-execution`
- Raw SKILL.md: https://api.skillmd.com/api/skills/falkordb/inspect-query-plans-before-execution/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: falkordb (https://skillmd.com/u/falkordb)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/falkordb/inspect-query-plans-before-execution

---


# Inspect query plans before execution

Use `GRAPH.EXPLAIN` to view the query execution plan without running the query.

## Usage

Use `GRAPH.EXPLAIN` to validate query plan structure and index usage before executing potentially expensive queries.

## Example

```bash
redis-cli GRAPH.EXPLAIN social "MATCH (p:Person {age: 30}) RETURN p"
```

## Notes

- `GRAPH.EXPLAIN` shows the execution plan without actually running the query
- Helps identify if indexes are being used effectively
- Useful for query optimization and debugging performance issues
- Shows the logical operators that will be used to execute the query
- Does not return actual data, only the execution plan

