# `Selecto.Performance.QueryAnalyzer`

Query analysis and optimization using adapter-backed EXPLAIN support.

Provides deep insights into query performance by:
- Running EXPLAIN ANALYZE on queries
- Parsing execution plans
- Identifying performance bottlenecks
- Suggesting optimizations
- Tracking index usage

# `analyze_index_usage`

Analyze index usage for a query.

# `analyze_query`

Analyze a query using EXPLAIN ANALYZE and return detailed performance information.

## Options

- `:format` - Output format (:text, :json, :xml, :yaml). Default: :json
- `:analyze` - Actually run the query (default: true)
- `:buffers` - Include buffer usage (default: true)
- `:verbose` - Include verbose output (default: false)
- `:timing` - Include timing information (default: true)
- `:summary` - Include summary (default: true)
- `:settings` - Include settings (default: false)

## Examples

    iex> QueryAnalyzer.analyze_query(selecto)
    {:ok, %{
      execution_time: 45.2,
      planning_time: 0.8,
      plan: %{...},
      suggestions: [...]
    }}

# `compare_queries`

Compare performance of two queries.

# `get_query_plan`

Get query plan without executing (EXPLAIN only, no ANALYZE).

# `get_table_statistics`

Get statistics for tables used in a query.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
