perf(db): otimizar índices — remover 7 sem uso, adicionar 17 em FKs

Baseado em análise do pg_stat_user_indexes (187 dias de estatísticas):
removidos 7 índices com 0 scans e adicionados 17 índices em foreign
keys que antes geravam sequential scans durante deletes nas tabelas pai.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-04-16 21:16:26 +00:00
parent 5635705c56
commit 4d9a1c0a35
4 changed files with 3097 additions and 148 deletions

View File

@@ -176,6 +176,13 @@
"when": 1774891206703,
"tag": "0024_petite_lucky_pierre",
"breakpoints": true
},
{
"idx": 25,
"version": "7",
"when": 1776351838548,
"tag": "0025_burly_colonel_america",
"breakpoints": true
}
]
}