Plan değişimi P436
Düşük Kötüleşme 7,0× BekliyorDB-11 · query_id 63991 · değişim 7.10.2026 09:00 · plan 64761 → 64797 · Geçiş · Sorgu detayı ve analizleri
Güven gerekçesiDüşük: güçlü karşı kanıt (WORK_PROPORTIONAL).
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 |
|---|---|---|---|---|---|
| P435 | 64326 → 64738 | İyileşme 308,3× | Bekliyor | – | 9.10.2026 14:51 |
Sorgu metni
(@keys nvarchar(4000),@from datetime,@to datetime,@minExec bigint)SELECT k.ServerId, k.DatabaseName, k.Hash, COUNT(*) AS Plans, MAX(x.AvgDuration) / NULLIF(MIN(x.AvgDuration), 0) AS Ratio
FROM OPENJSON(@keys) WITH (ServerId int, DatabaseName sysname, Hash varchar(18)) AS k
CROSS APPLY (
SELECT p.plan_id, SUM(r.avg_duration * r.count_executions) / NULLIF(SUM(r.count_executions), 0) AS AvgDuration
FROM perf.QdsQuery AS q
JOIN perf.QdsPlan AS p ON p.ServerID = q.ServerID AND p.DatabaseName = q.DatabaseName AND p.query_id = q.query_id
JOIN perf.QdsRuntimeStats AS r ON r.ServerID = p.ServerID AND r.DatabaseName = p.DatabaseName AND r.plan_id = p.plan_id
WHERE q.ServerID = k.ServerId AND q.DatabaseName = k.DatabaseName AND q.query_hash = CONVERT(binary(8), k.Hash, 1)
AND r.IntervalStartUtc >= @from AND r.IntervalStartUtc < DATEADD(day, 1, @to)
AND r.execution_type = 0 -- K1-1: iptal (3) ve hata (4) ortalamaya karışmaz
AND NOT EXISTS (SELECT 1 FROM perf.QdsQueryText AS it CROSS APPLY perf.fn_InternalQueryText(it.query_sql_text) AS iq WHERE it.TextHash = q.TextHash) -- K3-2b
GROUP BY p.plan_id
HAVING SUM(r.count_executions) >= @minExec) AS x
GROUP BY k.ServerId, k.DatabaseName, k.Hash
HAVING COUNT(*) >= 2
OPTION (RECOMPILE)1. Etki özeti
| Metrik | Eski plan (64761) | Yeni plan (64797) | Değişim |
|---|---|---|---|
| Çalışma | 20 | 175 | |
| İptal / hata | 0 / 0 | 0 / 0 | |
| Süre ort. (ms) | 32,6 | 229,1 | +603% |
| Süre maks. (ms) | 49,5 | 411,4 | +731% |
| Süre sapma (ms) | 6,1 | 33,3 | +446% |
| CPU ort. (ms) | 32,6 | 225,8 | +593% |
| CPU maks. (ms) | 49,5 | 367,7 | +643% |
| Mantıksal okuma ort. | 983,0 | 7.728,2 | +686% |
| Mantıksal okuma maks. | 983,0 | 7.972,0 | +711% |
| Fiziksel okuma | 0,0 | 0,3 | |
| Yazma | 0,0 | 0,0 | |
| Bellek (KB) | 2.552,0 | 6.972,6 | +173% |
| Tempdb (KB) | 0,0 | 0,0 | |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 0,7 | 29,7 | +4469% |
| Satır maks. | 1,0 | 33,0 | +3200% |
| Dönem | 6.10.2026 19:00 → 6.10.2026 20:00 | 7.10.2026 09:00 → 7.10.2026 22:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (64761) | Yeni plan (64797) |
|---|---|---|
| CPU | 0,1 | 3,5 |
| Memory | 0,1 | 0,8 |
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.QdsPlan.PK_QdsPlan | 6.10.2026 01:10 | → 59530/75318 | evet | evet | |
| StatsUpdated | perf.QdsPlan.IX_QdsPlan_Query | 6.10.2026 01:10 | → 59756/75318 | evet | evet | |
| StatsUpdated | perf.QdsPlan._WA_Sys_00000002_58671BC9 | 6.10.2026 01:10 | → 59756/75318 | evet | evet | |
| StatsUpdated | perf.QdsPlan._WA_Sys_00000003_58671BC9 | 6.10.2026 01:10 | → 59756/75318 | evet | evet | |
| StatsUpdated | perf.QdsPlan.IX_QdsPlan_PlanHash | 6.10.2026 00:12 | → 60278/74307 | evet | evet | |
| StatsUpdated | perf.QdsPlan.IX_QdsPlan_PlanHash | 6.10.2026 22:11 | → 59939/75823 | evet | evet | |
| StatsUpdated | perf.QdsPlan._WA_Sys_00000004_58671BC9 | 6.10.2026 01:16 | → 59764/75326 | evet | evet | |
| StatsUpdated | perf.QdsPlan._WA_Sys_00000004_58671BC9 | 6.10.2026 18:58 | → 59960/75810 | evet | evet | |
| StatsUpdated | perf.QdsPlan._WA_Sys_0000000A_58671BC9 | 5.10.2026 09:50 | → 53904/53904 | hayır | hayır | |
| StatsUpdated | perf.QdsPlan._WA_Sys_0000000A_58671BC9 | 5.10.2026 23:07 | → 60670/73395 | hayır | hayır | |
| StatsUpdated | perf.QdsPlan._WA_Sys_0000000A_58671BC9 | 6.10.2026 16:35 | → 59910/75792 | hayır | hayır | |
| 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 | 5.10.2026 09:17 | → 36445/42493 | hayır | hayır | |
| 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.QdsRuntimeStats.PK_QdsRuntimeStats | 5.10.2026 09:43 | → 40836/194710 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats.PK_QdsRuntimeStats | 5.10.2026 22:12 | → 42166/224637 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats.PK_QdsRuntimeStats | 6.10.2026 06:11 | → 42668/238843 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD | 5.10.2026 09:43 | → 40836/194710 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD | 5.10.2026 22:12 | → 42166/224637 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD | 6.10.2026 06:11 | → 42668/238843 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000007_5C37ACAD | 6.10.2026 03:30 | → 42656/235729 | hayır | hayır | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD | 5.10.2026 09:43 | → 40836/194710 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD | 5.10.2026 22:12 | → 42166/224637 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD | 6.10.2026 06:11 | → 42668/238843 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD | 5.10.2026 09:49 | → 40836/194714 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD | 5.10.2026 22:12 | → 42166/224637 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD | 6.10.2026 06:11 | → 42668/238843 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000004_5C37ACAD | 5.10.2026 09:57 | → 40836/194710 | hayır | hayır | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000004_5C37ACAD | 5.10.2026 22:12 | → 42166/224637 | hayır | hayır | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000004_5C37ACAD | 6.10.2026 06:11 | → 42668/238843 | hayır | hayır | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD | 5.10.2026 09:57 | → 40836/194710 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD | 5.10.2026 22:12 | → 42166/224637 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD | 6.10.2026 06:11 | → 42668/238843 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD | 5.10.2026 09:49 | → 40836/194714 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD | 5.10.2026 22:13 | → 42113/224763 | evet | evet | |
| StatsUpdated | perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD | 6.10.2026 16:35 | → 42991/242733 | evet | evet | |
| TableGrowth | perf.QdsQuery | 6.10.2026 00:00 – 7.10.2026 00:00 | 59806|30.34 → 60647|30.90 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.QdsQueryText | 6.10.2026 00:00 – 7.10.2026 00:00 | 4561|6.95 → 4610|7.14 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.QdsPlan | 6.10.2026 00:00 – 7.10.2026 00:00 | 75824|31.96 → 76968|32.65 | bilinmiyor | bilinmiyor | |
| TableGrowth | perf.QdsRuntimeStats | 6.10.2026 00:00 – 7.10.2026 00:00 | 246080|70.59 → 256980|73.59 | bilinmiyor | bilinmiyor |
3. Plan karşılaştırması
- Yalnız eski planda erişim: perf.QdsRuntimeStats Clustered Index Scan [PK_QdsRuntimeStats]; perf.QdsQuery Clustered Index Seek [PK_QdsQuery]; perf.QdsQueryText Clustered Index Seek [PK_QdsQueryText]
- Yalnız yeni planda erişim: perf.QdsQueryText Clustered Index Scan [PK_QdsQueryText]; perf.QdsQuery Clustered Index Scan [PK_QdsQuery]; perf.QdsRuntimeStats Clustered Index Seek [PK_QdsRuntimeStats]
- Yalnız eski planda join: Nested Loops (Left Anti Semi Join)
- Yalnız yeni planda join: Merge Join (Right Anti Semi Join)
- Tahmini maliyet: 1.533 → 6.134; tahmini satır: 1 → 43.7
- Eski planın index'leri
- perf.QdsRuntimeStats.PK_QdsRuntimeStats, perf.QdsPlan.IX_QdsPlan_Query, perf.QdsQuery.PK_QdsQuery, perf.QdsQueryText.PK_QdsQueryText
- Yeni planın index'leri
- perf.QdsQueryText.PK_QdsQueryText, perf.QdsQuery.PK_QdsQuery, perf.QdsPlan.IX_QdsPlan_Query, perf.QdsRuntimeStats.PK_QdsRuntimeStats
4. Neden adayları
ölçüm ve eşikle; kesin değildir| Kod | Ölçülen | Eşik | Sonuç | Açıklama |
|---|---|---|---|---|
| STATS | perf.QdsPlan.PK_QdsPlan güncellendi 2026-10-06 01:10 (örnekleme %79) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan.PK_QdsPlan 2026-10-06 01:10 güncellendi (örnekleme %79); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsPlan.IX_QdsPlan_Query güncellendi 2026-10-06 01:10 (örnekleme %79.3) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan.IX_QdsPlan_Query 2026-10-06 01:10 güncellendi (örnekleme %79.3); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsPlan._WA_Sys_00000002_58671BC9 güncellendi 2026-10-06 01:10 (örnekleme %79.3) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan._WA_Sys_00000002_58671BC9 2026-10-06 01:10 güncellendi (örnekleme %79.3); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsPlan._WA_Sys_00000003_58671BC9 güncellendi 2026-10-06 01:10 (örnekleme %79.3) | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan._WA_Sys_00000003_58671BC9 2026-10-06 01:10 güncellendi (örnekleme %79.3); planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsPlan.IX_QdsPlan_PlanHash güncellendi 2026-10-06 22:11 (örnekleme %79.1); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan.IX_QdsPlan_PlanHash 2026-10-06 22:11 güncellendi (örnekleme %79.1); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsPlan._WA_Sys_00000004_58671BC9 güncellendi 2026-10-06 18:58 (örnekleme %79.1); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsPlan._WA_Sys_00000004_58671BC9 2026-10-06 18:58 güncellendi (örnekleme %79.1); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| 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.QdsRuntimeStats.PK_QdsRuntimeStats güncellendi 2026-10-06 06:11 (örnekleme %17.9); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats.PK_QdsRuntimeStats 2026-10-06 06:11 güncellendi (örnekleme %17.9); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD güncellendi 2026-10-06 06:11 (örnekleme %17.9); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD 2026-10-06 06:11 güncellendi (örnekleme %17.9); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD güncellendi 2026-10-06 06:11 (örnekleme %17.9); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD 2026-10-06 06:11 güncellendi (örnekleme %17.9); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD güncellendi 2026-10-06 06:11 (örnekleme %17.9); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD 2026-10-06 06:11 güncellendi (örnekleme %17.9); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD güncellendi 2026-10-06 06:11 (örnekleme %17.9); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD 2026-10-06 06:11 güncellendi (örnekleme %17.9); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD güncellendi 2026-10-06 16:35 (örnekleme %17.7); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD 2026-10-06 16:35 güncellendi (örnekleme %17.7); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | 8 istatistik güncellendi, planlar kullanmıyor | desteklemiyor | Pencerede güncellenen ama iki planın da kullanmadığı istatistikler aday değil: perf.QdsPlan._WA_Sys_0000000A_58671BC9, perf.QdsQuery._WA_Sys_00000005_54968AE5, perf.QdsQuery._WA_Sys_00000008_54968AE5, perf.QdsQuery._WA_Sys_00000007_54968AE5, perf.QdsQueryText._WA_Sys_00000002_567ED357 (+3). | |
| GROWTH | perf.QdsQuery: satır 59,806 → 60,647 (%+1), boyut 30.34 → 30.9 MB (%+2) | ≥ %20 | desteklemiyor | perf.QdsQuery eski planın döneminden değişime kadar satır %+1, boyut %+2 değişti (2026-10-06 → 2026-10-07). |
| GROWTH | perf.QdsQueryText: satır 4,561 → 4,610 (%+1), boyut 6.95 → 7.14 MB (%+3) | ≥ %20 | desteklemiyor | perf.QdsQueryText eski planın döneminden değişime kadar satır %+1, boyut %+3 değişti (2026-10-06 → 2026-10-07). |
| GROWTH | perf.QdsPlan: satır 75,824 → 76,968 (%+2), boyut 31.96 → 32.65 MB (%+2) | ≥ %20 | desteklemiyor | perf.QdsPlan eski planın döneminden değişime kadar satır %+2, boyut %+2 değişti (2026-10-06 → 2026-10-07). |
| GROWTH | perf.QdsRuntimeStats: satır 246,080 → 256,980 (%+4), boyut 70.59 → 73.59 MB (%+4) | ≥ %20 | desteklemiyor | perf.QdsRuntimeStats eski planın döneminden değişime kadar satır %+4, boyut %+4 değişti (2026-10-06 → 2026-10-07). |
| WORKLOAD | çalışma başına satır 0.65 → 29.7 (45.69×) | ≥ 2× | destekliyor | Planlar farklı iş yükü görüyor: çalışma başına satır 0.65 → 29.7. Planlar farklı parametre/parti büyüklüğü için derlenmiş olabilir. |
| PARAM | baskın plan 1 kez el değiştirdi | ≥ 3 | desteklemiyor | Planlar dönüşümlü değil: yeni plan eskisinin yerini aldı. |
5. Karşı kanıtlar
- WORK_PROPORTIONAL (güçlü): Çalışma başına satır 45.69×, süre 7.03× değişti; satır başına süre 50.1687 → 7.7147 ms: süre farkı işlenen veri miktarından, plandan değil.
- LOW_SAMPLE (zayıf): Eski 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 #P436 | DB: DB-11 | Regression | Confidence: Low (review pending) Query: (@keys nvarchar(?),@from datetime,@to datetime,@minExec bigint)SELECT k.ServerId, k.DatabaseName, k.Hash, COUNT(*) AS Plans, MAX(x.AvgDuration) / NULLIF(MIN(x.AvgDuration), ?) AS Ratio FROM OPENJSON(@keys) WITH (ServerId int, DatabaseName sysname, Hash varchar(?)) AS k CROSS APPLY ( SELECT p.plan_id, SUM(r.avg_duration * r.count_executions) / NULLIF(SUM(r.count_executions), ?) AS AvgDuration FROM perf.QdsQuery AS q JOIN perf.QdsPlan AS p ON p.ServerID = q.ServerID AND p.DatabaseName = q.DatabaseName AND p.query_id = q.query_id JOIN perf.QdsRuntimeStats AS r ON r.ServerID = p.ServerID AND r.DatabaseName = p.DatabaseName AND r.plan_id = p.plan_id WHERE q.ServerID = k.ServerId AND q.DatabaseName = k.DatabaseName AND q.query_hash = CONVERT(binary(?), k.Hash, ?) AND r.IntervalStartUtc >= @from AND r.IntervalStartUtc < DATEADD(day, ?, @to) AND r.execution_type = ? AND NOT EXISTS (SELECT ? FROM perf.QdsQueryText AS it CROSS APPLY perf.fn_InternalQueryText(it.query_sql_text) AS iq WHERE it.TextHash = q.TextHash) GROUP BY p.plan_id HAVING SUM(r.count_executions) >= @minExec) AS x GROUP BY k.ServerId, k.DatabaseName, k.Hash HAVING COUNT(*) >= ? OPTION (RECOMPILE) Change: 2026-10-07 09:00 UTC, plan 64761 → 64797, pattern: Transition Impact (Query Store, per execution): duration 32.6 → 229.1 ms (+603%); CPU 32.6 → 225.8 ms (+593%); reads 983 → 7,728 (+686%); rows 0.65 → 29.7 (+4469%) Plan difference: Access only in the old plan: perf.QdsRuntimeStats Clustered Index Scan [PK_QdsRuntimeStats]; perf.QdsQuery Clustered Index Seek [PK_QdsQuery]; perf.QdsQueryText Clustered Index Seek [PK_QdsQueryText]; Access only in the new plan: perf.QdsQueryText Clustered Index Scan [PK_QdsQueryText]; perf.QdsQuery Clustered Index Scan [PK_QdsQuery]; perf.QdsRuntimeStats Clustered Index Seek [PK_QdsRuntimeStats]; Join only in the old plan: Nested Loops (Left Anti Semi Join); Join only in the new plan: Merge Join (Right Anti Semi Join) Candidate cause: STATS — Statistic perf.QdsPlan.PK_QdsPlan was updated 2026-10-06 01:10 (sampled 79%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsPlan.IX_QdsPlan_Query was updated 2026-10-06 01:10 (sampled 79.3%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsPlan._WA_Sys_00000002_58671BC9 was updated 2026-10-06 01:10 (sampled 79.3%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsPlan._WA_Sys_00000003_58671BC9 was updated 2026-10-06 01:10 (sampled 79.3%); the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsPlan.IX_QdsPlan_PlanHash was updated 2026-10-06 22:11 (sampled 79.1%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsPlan._WA_Sys_00000004_58671BC9 was updated 2026-10-06 18:58 (sampled 79.1%); 2 updates in the window; the plans use this statistic. 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.QdsRuntimeStats.PK_QdsRuntimeStats was updated 2026-10-06 06:11 (sampled 17.9%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsRuntimeStats._WA_Sys_00000002_5C37ACAD was updated 2026-10-06 06:11 (sampled 17.9%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsRuntimeStats._WA_Sys_00000003_5C37ACAD was updated 2026-10-06 06:11 (sampled 17.9%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsRuntimeStats._WA_Sys_00000006_5C37ACAD was updated 2026-10-06 06:11 (sampled 17.9%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsRuntimeStats._WA_Sys_00000005_5C37ACAD was updated 2026-10-06 06:11 (sampled 17.9%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic perf.QdsRuntimeStats._WA_Sys_00000008_5C37ACAD was updated 2026-10-06 16:35 (sampled 17.7%); 3 updates in the window; the plans use this statistic. Candidate cause: WORKLOAD — The plans see a different workload: rows per execution 0.65 → 29.7. The plans may have been compiled for different parameters or batch sizes. Counter-evidence: WORK_PROPORTIONAL — Rows per execution changed 45.69× and duration 7.03×; duration per row 50.1687 → 7.7147 ms: the duration difference comes from the amount of data processed, not the plan. Counter-evidence: LOW_SAMPLE — The old plan ran only 20 times: the sample is small and the average is weak. Confidence rationale: Low: strong counter-evidence (WORK_PROPORTIONAL). 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.