sql-server-tuning
/sql-server-tuning
Diagnozuje wolne zapytania SQL Server: czyta plany wykonania, szuka skanów i błędnych estymacji, sprawdza Query Store i indeksy.
- Autor
- RobinBeraud ↗
- Repozytorium
- claude-qa-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 10.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Diagnozuje wolne zapytania SQL Server: czyta plany wykonania, szuka skanów i błędnych estymacji, sprawdza Query Store i indeksy.
Oryginalny opis (EN)
Diagnose and fix slow SQL Server queries: read the actual execution plan, find scans, key lookups, spills and bad estimates, use Query Store to find regressions and plan changes, handle parameter sniffing, design covering indexes without over-indexing, and check statistics; measure logical reads before and after. Use when a query, report, batch or endpoint backed by SQL Server is slow, when CPU or blocking spikes, or when reviewing indexes.
Jak działa
- Measure
- Read the plan, right to left
- Rules
Podgląd SKILL.md
--- name: sql-server-tuning description: "Diagnose and fix slow SQL Server queries: read the actual execution plan, find scans, key lookups, spills and bad estimates, use Query Store to find regressions and plan changes, handle parameter sniffing, design covering indexes without over-indexing, and check statistics; measure logical reads before and after. Use when a query, report, batch or endpoint backed by SQL Server is slow, when CPU or blocking spikes, or when reviewing indexes." --- # SQL Server tuning ## Measure ```sql SET STATISTICS IO, TIME ON; -- logical reads and CPU per statement -- run the query, keep the ACTUAL execution plan ``` Query Store: "Top resource consuming queries" and "Regressed queries" show what got worse and when (a plan change after a deployment or a statistics update). ## Read the plan, right to left | You see | Usually means | Try | |---|---|---| | Index scan on a big table with a selective `WHERE` | no usable index, or non-sargable predicate | index on the filter columns; remove functions on columns (`WHERE YEAR(d)=2026` -> range) | | Key lookup executed thousands of times | index lacks columns | covering index with `INCLUDE` | | Estimated rows << actual rows | stale statistics, parameter sniffing, table variables | update statistics; `OPTION (RECOMPILE)` or `OPTIMIZE FOR` on that statement; temp tables | | Sort/hash with warning (spill) | memory grant too small, bad estimate | fix estimates first | | Implicit conversion warning | type mismatch (`nvarchar` parameter vs `varchar` column) | align parameter types (EF: column types, Dapper: `DbString`) | ## Rules - One change at a time; compare logical reads and duration on production-like data volume. - Every new index has a cost on writes: check existing indexes for overlap (`sys.dm_db_index_usage_stats`). - Blocking: look at the head blocker and the transaction length, not only the waiting query. - Never tune on an empty dev database.
Wersje
W bazie nie ma innych skilli o nazwie sql-server-tuning.
Migawka bazy z 13.11.2026 · wersja paczki 041444d4c985 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100query-optimization
Optymalizuje wolne zapytania T-SQL w SQL Server: SARGability, przepisywanie złączeń, parameter sniffing, hinty, statystyki, spille, Query Store i interpretacja planów wykonania. - 100query-optimization
Diagnozuje i optymalizuje istniejące wolne zapytania SQL przez plany wykonania, indeksy, przepisywanie zapytań i strojenie ORM. - 100flux-query
Optymalizuje wolne zapytania do baz danych: analizuje plany wykonania, dodaje indeksy i przepisuje zapytania SQL. - 100sql-style-and-tuning
Pisze SQL łatwy do czytania i przeglądania oraz przyspiesza wolne zapytania, czytając najpierw plan. - 100sql-optimizer
Analizuje zapytania SQL pod kątem brakujących indeksów, wzorca N+1, słabych złączeń i pełnych skanów tabel. - 100query-optimizer
Optymalizuje zapytania SQL: indeksy, przepisywanie zapytań i analizę planu wykonania, gdy zapytania są wolne.