QUEST #260 · PERFORMANCE

Raio-X com EXPLAIN ANALYZE

A consulta por magos está lenta. O DBA quer ver plano e tempo real de execução.

LV.5+115 XP
📖 CONCEITO

EXPLAIN mostra plano. EXPLAIN ANALYZE executa e mostra custo, tempo e linhas reais — essencial para tuning em Postgres.

EXEMPLO DE USO

Exemplo Postgres genérico com sintaxe ilustrativa.

🗄️ SCHEMA
Tabela `herois` (id SERIAL, nome TEXT, classe TEXT, nivel INT)
🎯 DESAFIO

Analise a busca por classe 'Mago' com EXPLAIN ANALYZE.

> CONSOLE_MÁGICO.SQL