Plan değişimi P426
Orta İyileşme 2171,8× BekliyorDB-11 · query_id 51420 · değişim 7.10.2026 10:00 · plan 62548 → 64806 · Geçiş · Sorgu detayı ve analizleri
Güven gerekçesiOrta: birden fazla aday (STATS, GROWTH, WORKLOAD) — rakip açıklamalar. Zayıf karşı kanıt: HIGH_VARIANCE, LOW_SAMPLE.
Bu sorgunun diğer plan değişimleri
Önceki kararlar; ters yöndeki değişim aynı planlar arasında geri dönüştür.| # | Planlar | Yön | Durum | Karar | Tespit |
|---|---|---|---|---|---|
| P425 | 54132 → 62548 | Kötüleşme 159,9× | Bekliyor | – | 9.10.2026 14:51 |
Sorgu metni
(@from datetime,@to datetime,@srv int,@dbName nvarchar(4000),@minExec bigint,@len int,@regMin bigint,@regression bit,@regRatio float,@candidates bit,@qHash varbinary(8000),@qId bigint,@qText nvarchar(4000))WITH cur AS (
SELECT ServerID, DatabaseName, query_hash,
ISNULL(SUM(Executions), 0) AS Executions, ISNULL(SUM(TotalCpuMs), 0) AS TotalCpuMs, ISNULL(SUM(TotalDurationMs), 0) AS TotalDurationMs,
MAX(P95DurationMs) AS P95DurationMs, ISNULL(SUM(TotalLogicalReads), 0) AS TotalLogicalReads,
ISNULL(SUM(CAST(BlockedOthersCount AS bigint)), 0) AS BlockedOthersCount, ISNULL(MAX(PlanCount), 0) AS PlanCount,
COUNT(*) AS DayCount, MAX(ObjectName) AS ObjectName
FROM perf.QueryDailyStats
WHERE StatDateUtc BETWEEN @from AND @to
AND (@srv IS NULL OR ServerID = @srv) AND (@dbName IS NULL OR DatabaseName = @dbName)
GROUP BY ServerID, DatabaseName, query_hash
HAVING ISNULL(SUM(Executions), 0) >= @minExec
),
prev AS ( -- önceki eşit uzunluktaki dönem (kötüleşme)
SELECT ServerID, DatabaseName, query_hash, SUM(Executions) AS Executions, SUM(TotalDurationMs) AS TotalDurationMs
FROM perf.QueryDailyStats
WHERE StatDateUtc BETWEEN DATEADD(day, -@len, @from) AND DATEADD(day, -1, @from)
AND (@srv IS NULL OR ServerID = @srv) AND (@dbName IS NULL OR DatabaseName = @dbName)
GROUP BY ServerID, DatabaseName, query_hash
),
ranked AS (
SELECT c.*,
CASE WHEN c.Executions >= @regMin AND p.Executions >= @regMin AND p.TotalDurationMs > 0
THEN (c.TotalDurationMs / c.Executions) / (p.TotalDurationMs / p.Executions) END AS RegressionRatio
FROM cur AS c
LEFT JOIN prev AS p ON p.ServerID = c.ServerID AND p.DatabaseName = c.DatabaseName AND p.query_hash = c.query_hash
)
SELECT c.*, ISNULL(t.State, 'New') AS State, qc.Reasons AS CandidateReasons
INTO #r
FROM ranked AS c
LEFT JOIN #t AS t ON t.ServerID = c.ServerID AND t.DatabaseName = c.DatabaseName AND t.QueryHash = c.query_hash
LEFT JOIN rag.QueryCandidate AS qc ON qc.ServerID = c.ServerID AND qc.DatabaseName = c.DatabaseName AND qc.QueryHash = c.query_hash
WHERE (@regression = 0 OR c.RegressionRatio >= @regRatio)
AND (@candidates = 0 OR qc.Reasons IS NOT NULL)
AND (@qHash IS NULL OR c.query_hash = @qHash)
AND (@qId IS NULL OR EXISTS (SELECT 1 FROM perf.QdsQuery AS q
WHERE q.ServerID = c.ServerID AND q.DatabaseName = c.DatabaseName AND q.query_hash = c.query_hash AND q.query_id = @qId))
-- Metin: nesne adı ya da dönemdeki örnek metinlerden biri (yalnız süzülmüş dönem satırlarında; ham metin taranmaz)
AND (@qText IS NULL OR c.ObjectName LIKE @qText
OR EXISTS (SELECT 1 FROM perf.QueryDailyStats AS d
LEFT JOIN perf.QdsQueryText AS qt ON qt.TextHash = d.SampleTextHash
LEFT JOIN perf.SqlText AS st ON st.TextHash = d.SampleTextHash
WHERE d.ServerID = c.ServerID AND d.DatabaseName = c.DatabaseName AND d.query_hash = c.query_hash
AND d.StatDateUtc BETWEEN @from AND @to AND d.SampleTextHash IS NOT NULL
AND (qt.query_sql_text LIKE @qText OR st.SqlText LIKE @qText)))1. Etki özeti
| Metrik | Eski plan (62548) | Yeni plan (64806) | Değişim |
|---|---|---|---|
| Çalışma | 169 | 20 | |
| İptal / hata | 0 / 0 | 0 / 0 | |
| Süre ort. (ms) | 5.459,6 | 2,5 | -100% |
| Süre maks. (ms) | 21.735,7 | 6,3 | -100% |
| Süre sapma (ms) | 7.567,5 | 1,3 | -100% |
| CPU ort. (ms) | 5.451,9 | 2,5 | -100% |
| CPU maks. (ms) | 21.735,0 | 6,3 | -100% |
| Mantıksal okuma ort. | 629.959,9 | 269,9 | -100% |
| Mantıksal okuma maks. | 1.804.507,0 | 300,0 | -100% |
| Fiziksel okuma | 1,4 | 0,0 | -100% |
| Yazma | 16,9 | 0,6 | -97% |
| Bellek (KB) | 2.056,3 | 1.024,0 | -50% |
| Tempdb (KB) | 318,9 | 128,0 | -60% |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 930,9 | 3,0 | -100% |
| Satır maks. | 2.660,0 | 4,0 | -100% |
| Dönem | 5.10.2026 22:00 → 8.10.2026 20:00 | 7.10.2026 10:00 → 7.10.2026 21:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (62548) | Yeni plan (64806) |
|---|---|---|
| CPU | 16,1 | – |
| Memory | 0,2 | – |
2. Zaman çizelgesi
Eski planYeni plan
┆ değişim anı (kesik çizgi)░ olay (bant: zamanı aralık olarak bilinen)
Olaylar
| Olay | Nesne | Zaman | Önce → sonra | Eski plan kullanıyor | Yeni plan kullanıyor | |
|---|---|---|---|---|---|---|
| StatsUpdated | perf.QdsQuery.PK_QdsQuery | 6.10.2026 01:10 | → 41193/59507 | evet | evet | |
| StatsUpdated | perf.QdsQuery.IX_QdsQuery_QueryHash | 5.10.2026 23:06 | → 39118/56017 | evet | evet | |
| StatsUpdated | perf.QdsQuery.IX_QdsQuery_QueryHash | 6.10.2026 17:10 | → 40060/59798 | evet | evet | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000002_54968AE5 | 6.10.2026 01:10 | → 41193/59507 | evet | evet | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000003_54968AE5 | 6.10.2026 01:10 | → 41193/59507 | evet | evet | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000005_54968AE5 | 6.10.2026 01:10 | → 40090/59507 | hayır | hayır | |
| StatsUpdated | perf.QdsQuery.IX_QdsQuery_TextHash | 5.10.2026 23:06 | → 39118/56017 | evet | evet | |
| StatsUpdated | perf.QdsQuery.IX_QdsQuery_TextHash | 6.10.2026 17:10 | → 40060/59798 | evet | evet | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000008_54968AE5 | 6.10.2026 01:16 | → 40096/59513 | hayır | hayır | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000008_54968AE5 | 6.10.2026 15:27 | → 40058/59796 | hayır | hayır | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000007_54968AE5 | 5.10.2026 22:08 | → 38993/54038 | hayır | hayır | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000007_54968AE5 | 6.10.2026 03:30 | → 40031/59570 | hayır | hayır | |
| StatsUpdated | perf.QdsQuery._WA_Sys_00000007_54968AE5 | 6.10.2026 22:15 | → 40067/59806 | hayır | hayır | |
| StatsUpdated | perf.QdsQueryText.PK_QdsQueryText | 6.10.2026 00:19 | → 4440/4440 | evet | evet | |
| StatsUpdated | perf.QdsQueryText.PK_QdsQueryText | 6.10.2026 05:48 | → 4516/4516 | evet | evet | |
| StatsUpdated | perf.QdsQueryText._WA_Sys_00000002_567ED357 | 5.10.2026 22:41 | → 4366/4366 | hayır | hayır | |
| StatsUpdated | perf.QdsQueryText._WA_Sys_00000002_567ED357 | 6.10.2026 05:34 | → 4509/4509 | hayır | hayır | |
| StatsUpdated | perf.QdsQueryText._WA_Sys_00000003_567ED357 | 6.10.2026 00:34 | → 4434/4434 | hayır | hayır | |
| StatsUpdated | perf.QdsQueryText._WA_Sys_00000003_567ED357 | 6.10.2026 19:19 | → 4561/4561 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats.PK_QueryDailyStats | 6.10.2026 00:45 | → 17411/23992 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats.PK_QueryDailyStats | 6.10.2026 19:19 | → 17409/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000008_5D80D6A1 | 6.10.2026 00:45 | → 18400/23992 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000008_5D80D6A1 | 6.10.2026 19:19 | → 18365/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000003_5D80D6A1 | 6.10.2026 00:45 | → 17411/23992 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000003_5D80D6A1 | 6.10.2026 19:19 | → 17409/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000007_5D80D6A1 | 6.10.2026 00:43 | → 18356/23943 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000007_5D80D6A1 | 6.10.2026 19:19 | → 18365/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000004_5D80D6A1 | 6.10.2026 00:45 | → 17411/23992 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000004_5D80D6A1 | 6.10.2026 19:19 | → 17409/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000015_5D80D6A1 | 6.10.2026 00:43 | → 18356/23943 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000015_5D80D6A1 | 6.10.2026 19:29 | → 18321/23938 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000016_5D80D6A1 | 6.10.2026 00:43 | → 18356/23943 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000016_5D80D6A1 | 6.10.2026 19:29 | → 18321/23938 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000018_5D80D6A1 | 6.10.2026 00:43 | → 18356/23943 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000018_5D80D6A1 | 6.10.2026 19:19 | → 18365/23987 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_0000001B_5D80D6A1 | 6.10.2026 00:43 | → 18356/23943 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_0000001B_5D80D6A1 | 6.10.2026 19:29 | → 18321/23938 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats.IX_QueryDailyStats_Query | 6.10.2026 00:45 | → 18400/23992 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats.IX_QueryDailyStats_Query | 6.10.2026 19:19 | → 18365/23987 | evet | evet | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000006_5D80D6A1 | 6.10.2026 00:45 | → 18356/23943 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000006_5D80D6A1 | 6.10.2026 03:00 | → 18321/23938 | hayır | hayır | |
| StatsUpdated | perf.QueryDailyStats._WA_Sys_00000013_5D80D6A1 | 5.10.2026 22:44 | → 20420/26280 | hayır | hayır | |
| StatsUpdated | rag.QueryCandidate.PK_QueryCandidate | 6.10.2026 00:45 | → 20/20 | evet | evet | |
| StatsUpdated | rag.QueryCandidate.PK_QueryCandidate | 7.10.2026 10:27 | → 20/20 | evet | evet | sıra belirsiz |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000002_79DEE6A5 | 6.10.2026 00:45 | → 20/20 | evet | evet | |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000002_79DEE6A5 | 7.10.2026 10:27 | → 20/20 | evet | evet | sıra belirsiz |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000003_79DEE6A5 | 6.10.2026 00:45 | → 20/20 | evet | evet | |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000003_79DEE6A5 | 7.10.2026 10:27 | → 20/20 | evet | evet | sıra belirsiz |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000004_79DEE6A5 | 6.10.2026 00:45 | → 20/20 | evet | evet | |
| StatsUpdated | rag.QueryCandidate._WA_Sys_00000004_79DEE6A5 | 6.10.2026 16:35 | → 20/20 | evet | evet | |
| TableGrowth | perf.QdsQuery | 5.10.2026 00:00 – 7.10.2026 00:00 | 42501|21.77 → 60647|30.90 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.QdsQueryText | 5.10.2026 00:00 – 7.10.2026 00:00 | 4084|6.33 → 4610|7.14 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.QueryDailyStats | 5.10.2026 00:00 – 7.10.2026 00:00 | 23099|12.23 → 23943|19.42 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.SqlText | 5.10.2026 00:00 – 7.10.2026 00:00 | 157|0.83 → 208|1.27 | bilinmiyor | bilinmiyor | |
| TableGrowth | rag.QueryCandidate | 5.10.2026 00:00 – 7.10.2026 00:00 | 20|0.07 → 20|0.07 | bilinmiyor | bilinmiyor |
3. Plan karşılaştırması
- Yalnız eski planda erişim: perf.QueryDailyStats Clustered Index Seek [PK_QueryDailyStats]; perf.SqlText Clustered Index Seek [PK_perf_SqlText]
- Yalnız yeni planda erişim: perf.QueryDailyStats Index Scan [IX_QueryDailyStats_Query]; perf.QueryDailyStats Clustered Index Seek [PK_QueryDailyStats] (lookup); perf.QueryDailyStats Index Seek [IX_QueryDailyStats_Query]; perf.SqlText Clustered Index Scan [PK_perf_SqlText]
- Yalnız yeni planda join: Nested Loops (Inner Join) ×3
- Tahmini maliyet: 0.037 → 0.487; tahmini satır: 1 → 26.3
- Eski planın index'leri
- perf.QueryDailyStats.PK_QueryDailyStats, perf.QdsQuery.PK_QdsQuery, perf.QdsQueryText.PK_QdsQueryText, perf.SqlText.PK_perf_SqlText, rag.QueryCandidate.PK_QueryCandidate
- Yeni planın index'leri
- perf.QueryDailyStats.IX_QueryDailyStats_Query, perf.QueryDailyStats.PK_QueryDailyStats, perf.QdsQuery.PK_QdsQuery, perf.QdsQueryText.PK_QdsQueryText, perf.SqlText.PK_perf_SqlText, rag.QueryCandidate.PK_QueryCandidate
4. Neden adayları
ölçüm ve eşikle; kesin değildir| Kod | Ölçülen | Eşik | Sonuç | Açıklama |
|---|---|---|---|---|
| STATS | perf.QdsQuery.PK_QdsQuery güncellendi 2026-10-06 01:10 (örnekleme %69.2) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQuery.PK_QdsQuery 2026-10-06 01:10 güncellendi (örnekleme %69.2); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsQuery.IX_QdsQuery_QueryHash güncellendi 2026-10-06 17:10 (örnekleme %67); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQuery.IX_QdsQuery_QueryHash 2026-10-06 17:10 güncellendi (örnekleme %67); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsQuery._WA_Sys_00000002_54968AE5 güncellendi 2026-10-06 01:10 (örnekleme %69.2) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQuery._WA_Sys_00000002_54968AE5 2026-10-06 01:10 güncellendi (örnekleme %69.2); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsQuery._WA_Sys_00000003_54968AE5 güncellendi 2026-10-06 01:10 (örnekleme %69.2) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQuery._WA_Sys_00000003_54968AE5 2026-10-06 01:10 güncellendi (örnekleme %69.2); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsQuery.IX_QdsQuery_TextHash güncellendi 2026-10-06 17:10 (örnekleme %67); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQuery.IX_QdsQuery_TextHash 2026-10-06 17:10 güncellendi (örnekleme %67); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsQueryText.PK_QdsQueryText güncellendi 2026-10-06 05:48 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsQueryText.PK_QdsQueryText 2026-10-06 05:48 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats.PK_QueryDailyStats güncellendi 2026-10-06 19:19 (örnekleme %72.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats.PK_QueryDailyStats 2026-10-06 19:19 güncellendi (örnekleme %72.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats._WA_Sys_00000008_5D80D6A1 güncellendi 2026-10-06 19:19 (örnekleme %76.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats._WA_Sys_00000008_5D80D6A1 2026-10-06 19:19 güncellendi (örnekleme %76.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats._WA_Sys_00000003_5D80D6A1 güncellendi 2026-10-06 19:19 (örnekleme %72.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats._WA_Sys_00000003_5D80D6A1 2026-10-06 19:19 güncellendi (örnekleme %72.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats._WA_Sys_00000007_5D80D6A1 güncellendi 2026-10-06 19:19 (örnekleme %76.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats._WA_Sys_00000007_5D80D6A1 2026-10-06 19:19 güncellendi (örnekleme %76.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats._WA_Sys_00000004_5D80D6A1 güncellendi 2026-10-06 19:19 (örnekleme %72.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats._WA_Sys_00000004_5D80D6A1 2026-10-06 19:19 güncellendi (örnekleme %72.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QueryDailyStats.IX_QueryDailyStats_Query güncellendi 2026-10-06 19:19 (örnekleme %76.6); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QueryDailyStats.IX_QueryDailyStats_Query 2026-10-06 19:19 güncellendi (örnekleme %76.6); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.QueryCandidate.PK_QueryCandidate güncellendi 2026-10-06 00:45 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.QueryCandidate.PK_QueryCandidate 2026-10-06 00:45 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.QueryCandidate._WA_Sys_00000002_79DEE6A5 güncellendi 2026-10-06 00:45 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.QueryCandidate._WA_Sys_00000002_79DEE6A5 2026-10-06 00:45 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.QueryCandidate._WA_Sys_00000003_79DEE6A5 güncellendi 2026-10-06 00:45 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.QueryCandidate._WA_Sys_00000003_79DEE6A5 2026-10-06 00:45 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.QueryCandidate._WA_Sys_00000004_79DEE6A5 güncellendi 2026-10-06 16:35 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.QueryCandidate._WA_Sys_00000004_79DEE6A5 2026-10-06 16:35 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | 11 istatistik güncellendi, planlar kullanmıyor | desteklemiyor | Pencerede güncellenen ama iki planın da kullanmadığı istatistikler aday değil: perf.QdsQuery._WA_Sys_00000005_54968AE5, perf.QdsQuery._WA_Sys_00000008_54968AE5, perf.QdsQuery._WA_Sys_00000007_54968AE5, perf.QdsQueryText._WA_Sys_00000002_567ED357, perf.QdsQueryText._WA_Sys_00000003_567ED357 (+6). | |
| GROWTH | perf.QdsQuery: satır 42,501 → 60,647 (%+43), boyut 21.77 → 30.9 MB (%+42) | ≥ %20 | destekliyor | perf.QdsQuery eski planın döneminden değişime kadar satır %+43, boyut %+42 değişti (2026-10-05 → 2026-10-07). |
| GROWTH | perf.QdsQueryText: satır 4,084 → 4,610 (%+13), boyut 6.33 → 7.14 MB (%+13) | ≥ %20 | desteklemiyor | perf.QdsQueryText eski planın döneminden değişime kadar satır %+13, boyut %+13 değişti (2026-10-05 → 2026-10-07). |
| GROWTH | perf.QueryDailyStats: satır 23,099 → 23,943 (%+4), boyut 12.23 → 19.42 MB (%+59) | ≥ %20 | destekliyor | perf.QueryDailyStats eski planın döneminden değişime kadar satır %+4, boyut %+59 değişti (2026-10-05 → 2026-10-07). |
| GROWTH | perf.SqlText: satır 157 → 208 (%+32), boyut 0.83 → 1.27 MB (%+53) | ≥ %20 | destekliyor | perf.SqlText eski planın döneminden değişime kadar satır %+32, boyut %+53 değişti (2026-10-05 → 2026-10-07). |
| GROWTH | rag.QueryCandidate: satır 20 → 20 (%0), boyut 0.07 → 0.07 MB (%0) | ≥ %20 | desteklemiyor | rag.QueryCandidate eski planın döneminden değişime kadar satır %0, boyut %0 değişti (2026-10-05 → 2026-10-07). |
| WORKLOAD | çalışma başına satır 930.89 → 3 (310.3×) | ≥ 2× | destekliyor | Planlar farklı iş yükü görüyor: çalışma başına satır 930.89 → 3. Planlar farklı parametre/parti büyüklüğü için derlenmiş olabilir. |
| PARAM | baskın plan 0 kez el değiştirdi | ≥ 3 | desteklemiyor | Planlar dönüşümlü değil: yeni plan eskisinin yerini aldı. |
5. Karşı kanıtlar
- HIGH_VARIANCE (zayıf): Eski planın süre sapması ortalamanın %139'i: ortalama güvenilir değil.
- LOW_SAMPLE (zayıf): Yeni plan yalnız 20 kez çalışmış: örnek az, ortalama zayıf.
6. Korpus metni önizlemesi
onaylanınca RAG hafızasına bu metin girer (başlığa onaylayan eklenir)Plan change case #P426 | DB: DB-11 | Improvement | Confidence: Medium (review pending) Query: (@from datetime,@to datetime,@srv int,@dbName nvarchar(?),@minExec bigint,@len int,@regMin bigint,@regression bit,@regRatio float,@candidates bit,@qHash varbinary(?),@qId bigint,@qText nvarchar(?))WITH cur AS ( SELECT ServerID, DatabaseName, query_hash, ISNULL(SUM(Executions), ?) AS Executions, ISNULL(SUM(TotalCpuMs), ?) AS TotalCpuMs, ISNULL(SUM(TotalDurationMs), ?) AS TotalDurationMs, MAX(P95DurationMs) AS P95DurationMs, ISNULL(SUM(TotalLogicalReads), ?) AS TotalLogicalReads, ISNULL(SUM(CAST(BlockedOthersCount AS bigint)), ?) AS BlockedOthersCount, ISNULL(MAX(PlanCount), ?) AS PlanCount, COUNT(*) AS DayCount, MAX(ObjectName) AS ObjectName FROM perf.QueryDailyStats WHERE StatDateUtc BETWEEN @from AND @to AND (@srv IS NULL OR ServerID = @srv) AND (@dbName IS NULL OR DatabaseName = @dbName) GROUP BY ServerID, DatabaseName, query_hash HAVING ISNULL(SUM(Executions), ?) >= @minExec ), prev AS ( SELECT ServerID, DatabaseName, query_hash, SUM(Executions) AS Executions, SUM(TotalDurationMs) AS TotalDurationMs FROM perf.QueryDailyStats WHERE StatDateUtc BETWEEN DATEADD(day, -@len, @from) AND DATEADD(day, -?, @from) AND (@srv IS NULL OR ServerID = @srv) AND (@dbName IS NULL OR DatabaseName = @dbName) GROUP BY ServerID, DatabaseName, query_hash ), ranked AS ( SELECT c.*, CASE WHEN c.Executions >= @regMin AND p.Executions >= @regMin AND p.TotalDurationMs > ? THEN (c.TotalDurationMs / c.Executions) / (p.TotalDurationMs / p.Executions) END AS RegressionRatio FROM cur AS c LEFT JOIN prev AS p ON p.ServerID = c.ServerID AND p.DatabaseName = c.DatabaseName AND p.query_hash = c.query_hash ) SELECT c.*, ISNULL(t.State, ?) AS State, qc.Reasons AS CandidateReasons INTO #r FROM ranked AS c LEFT JOIN #t AS t ON t.ServerID = c.ServerID AND t.DatabaseName = c.DatabaseName AND t.QueryHash = c.query_hash LEFT JOIN rag.QueryCandidate AS qc ON qc.ServerID = c.ServerID AND qc.DatabaseName = c.DatabaseName AND qc.QueryHash = c.query_hash WHERE (@regression = ? OR c.RegressionRatio >= @regRatio) AND (@candidates = ? OR qc.Reasons IS NOT NULL) AND (@qHash IS NULL OR c.query_hash = @qHash) AND (@qId IS NULL OR EXISTS (SELECT ? FROM perf.QdsQuery AS q WHERE q.ServerID = c.ServerID AND q.DatabaseName = c.DatabaseName AND q.query_hash = c.query_hash AND q.query_id = @qId)) AND (@qText IS NULL OR c.ObjectName LIKE @qText OR EXISTS (SELECT ? FROM perf.QueryDailyStats AS d LEFT JOIN perf.QdsQueryText AS qt ON qt.TextHash = d.SampleTextHash LEFT JOIN perf.SqlText AS st ON st.TextHash = d.SampleTextHash WHERE d.ServerID = c.ServerID AND d.DatabaseName = c.DatabaseName AND d.query_hash = c.query_hash AND d.StatDateUtc BETWEEN @from AND @to AND d.SampleTextHash IS NOT NULL AND (qt.query_sql_text LIKE @qText OR st.SqlText LIKE @qText))) Change: 2026-10-07 10:00 UTC, plan 62548 → 64806, pattern: Transition Impact (Query Store, per execution): duration 5459.6 → 2.5 ms (-100%); CPU 5451.9 → 2.5 ms (-100%); reads 629,960 → 270 (-100%); rows 930.89 → 3 (-100%) Plan difference: Access only in the old plan: perf.QueryDailyStats Clustered Index Seek [PK_QueryDailyStats]; perf.SqlText Clustered Index Seek [PK_perf_SqlText]; Access only in the new plan: perf.QueryDailyStats Index Scan [IX_QueryDailyStats_Query]; perf.QueryDailyStats Clustered Index Seek [PK_QueryDailyStats] (lookup); perf.QueryDailyStats Index Seek [IX_QueryDailyStats_Query]; perf.SqlText Clustered Index Scan [PK_perf_SqlText]; Join only in the new plan: Nested Loops (Inner Join) ×3; Estimated cost: 0.037 → 0.487; estimated rows: 1 → 26.3 Candidate cause: STATS — Statistic perf.QdsQuery.PK_QdsQuery was updated 2026-10-06 01:10 (sampled 69.2%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsQuery.IX_QdsQuery_QueryHash was updated 2026-10-06 17:10 (sampled 67%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsQuery._WA_Sys_00000002_54968AE5 was updated 2026-10-06 01:10 (sampled 69.2%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsQuery._WA_Sys_00000003_54968AE5 was updated 2026-10-06 01:10 (sampled 69.2%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsQuery.IX_QdsQuery_TextHash was updated 2026-10-06 17:10 (sampled 67%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsQueryText.PK_QdsQueryText was updated 2026-10-06 05:48 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats.PK_QueryDailyStats was updated 2026-10-06 19:19 (sampled 72.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats._WA_Sys_00000008_5D80D6A1 was updated 2026-10-06 19:19 (sampled 76.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats._WA_Sys_00000003_5D80D6A1 was updated 2026-10-06 19:19 (sampled 72.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats._WA_Sys_00000007_5D80D6A1 was updated 2026-10-06 19:19 (sampled 76.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats._WA_Sys_00000004_5D80D6A1 was updated 2026-10-06 19:19 (sampled 72.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QueryDailyStats.IX_QueryDailyStats_Query was updated 2026-10-06 19:19 (sampled 76.6%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.QueryCandidate.PK_QueryCandidate was updated 2026-10-06 00:45 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.QueryCandidate._WA_Sys_00000002_79DEE6A5 was updated 2026-10-06 00:45 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.QueryCandidate._WA_Sys_00000003_79DEE6A5 was updated 2026-10-06 00:45 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.QueryCandidate._WA_Sys_00000004_79DEE6A5 was updated 2026-10-06 16:35 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: GROWTH — From the old plan's period to the change, perf.QdsQuery rows changed +43% and size +42% (2026-10-05 → 2026-10-07). Candidate cause: GROWTH — From the old plan's period to the change, perf.QueryDailyStats rows changed +4% and size +59% (2026-10-05 → 2026-10-07). Candidate cause: GROWTH — From the old plan's period to the change, perf.SqlText rows changed +32% and size +53% (2026-10-05 → 2026-10-07). Candidate cause: WORKLOAD — The plans see a different workload: rows per execution 930.89 → 3. The plans may have been compiled for different parameters or batch sizes. Counter-evidence: HIGH_VARIANCE — The old plan's duration standard deviation is 139% of the average: the average is not reliable. Counter-evidence: LOW_SAMPLE — The new plan ran only 20 times: the sample is small and the average is weak. Confidence rationale: Medium: more than one candidate (STATS, GROWTH, WORKLOAD) — competing explanations. Weak counter-evidence: HIGH_VARIANCE, LOW_SAMPLE. Note: this is a candidate cause, not proof of the root cause.
7. Karar
Karar vermek için Analyst rolü gerekir.
Karar geçmişi
Kayıt yok
Henüz karar yok.