Initial commit: local SQL expert AI (Ollama + CLI + prompts + systemd timer)

This commit is contained in:
2026-01-27 21:30:15 +01:00
commit 394edc1709
18 changed files with 574 additions and 0 deletions

27
prompts/plan_review.md Normal file
View File

@@ -0,0 +1,27 @@
# Execution Plan Review Template (Showplan XML/Text)
## Kontext (optional)
- Query text (falls verfügbar)
- Parameterwerte bei Capture
- CPU/Duration/Reads/Rowcount bei Capture
- Server settings: MAXDOP, Cost Threshold for Parallelism (falls bekannt)
## Aufgabe
1) Kurzfazit
2) Hotspots:
- Top Operatoren nach Kosten
- Spills (Sort/Hash), Warnings
- Memory Grant: zu hoch/zu niedrig
- Parallelism (CXPACKET/CXCONSUMER Kontext)
3) Kardinalität:
- wo weicht Estimated vs Actual ab? (wenn Actual vorhanden)
- Stats/Histogramm Hinweise
4) Fixes:
- Query Rewrite
- Index/Stats Empfehlungen
- Parameter Sniffing Mitigation
5) Checkliste für Validierung
---BEGIN PLAN---
<PASTE HERE>
---END PLAN---