Plan değişimi P404
Orta Kötüleşme 25,7× BekliyorDB-11 · query_id 875 · DBA.usp_Pull_Qds · değişim 27.09.2026 22:00 · plan 742 → 2811 · Dönüşümlü (51 el değiştirme) · Sorgu detayı ve analizleri
Güven gerekçesiOrta: tek aday (PARAM), mekanik değil (plan ile doğrudan bağ kanıtlanmıyor). Zayıf karşı kanıt: HIGH_VARIANCE, METADATA_GAP.
Sorgu metni
(@ServerID int,@DatabaseName nvarchar(128),@Reset bit,@list nvarchar(max))SELECT @list = STRING_AGG(CAST(s.query_text_id AS nvarchar(max)), N',')
FROM (SELECT DISTINCT TOP (2000) query_text_id FROM perf.Stg_QdsQuery AS g -- R04-3: üst sınır
WHERE g.ServerID = @ServerID AND g.DatabaseName = @DatabaseName
AND (@Reset = 1 OR NOT EXISTS (SELECT 1 FROM perf.QdsQuery AS q WHERE q.ServerID = g.ServerID AND q.DatabaseName = g.DatabaseName
AND q.query_text_id = g.query_text_id AND q.TextHash IS NOT NULL))
ORDER BY query_text_id DESC) AS s1. Etki özeti
| Metrik | Eski plan (742) | Yeni plan (2811) | Değişim |
|---|---|---|---|
| Çalışma | 565 | 448 | |
| İptal / hata | 0 / 0 | 0 / 0 | |
| Süre ort. (ms) | 8,8 | 225,8 | +2473% |
| Süre maks. (ms) | 371,0 | 4.475,6 | +1106% |
| Süre sapma (ms) | 27,1 | 244,2 | +800% |
| CPU ort. (ms) | 8,2 | 218,7 | +2579% |
| CPU maks. (ms) | 371,0 | 4.408,9 | +1089% |
| Mantıksal okuma ort. | 2.606,0 | 145.000,1 | +5464% |
| Mantıksal okuma maks. | 136.313,0 | 219.497,0 | +61% |
| Fiziksel okuma | 4,5 | 18,7 | +318% |
| Yazma | 0,0 | 879,4 | |
| Bellek (KB) | 1.024,0 | 1.024,0 | 0% |
| Tempdb (KB) | 0,0 | 7.208,1 | |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 1,0 | 1,0 | 0% |
| Satır maks. | 1,0 | 1,0 | 0% |
| Dönem | 27.09.2026 22:00 → 8.10.2026 21:00 | 27.09.2026 22:00 → 8.10.2026 21:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (742) | Yeni plan (2811) |
|---|---|---|
| CPU | 0,6 | 7,3 |
| Memory | 0,0 | 0,4 |
| Buffer IO | 0,0 | 0,2 |
2. Zaman çizelgesi
Eski planYeni plan
┆ değişim anı (kesik çizgi)░ olay (bant: zamanı aralık olarak bilinen)
Pencerede olay yok — metadata toplama 1.10.2026 tarihinde başladı, değişimden önceki olaylar görülemez (veri yok).
3. Plan karşılaştırması
- Yalnız eski planda erişim: perf.QdsQuery Clustered Index Seek [PK_QdsQuery]
- Yalnız yeni planda erişim: perf.QdsQuery Clustered Index Scan [PK_QdsQuery]
- Tahmini maliyet: 0.015 → 0.025; tahmini satır: 1 → 1
- Eski planın index'leri
- perf.QdsQuery.PK_QdsQuery
- Yeni planın index'leri
- perf.QdsQuery.PK_QdsQuery
4. Neden adayları
ölçüm ve eşikle; kesin değildir| Kod | Ölçülen | Eşik | Sonuç | Açıklama |
|---|---|---|---|---|
| WORKLOAD | çalışma başına satır 1 → 1 (1×) | ≥ 2× | desteklemiyor | Çalışma başına satır benzer (1 → 1): iş yükü farkı yok. |
| PARAM | baskın plan 51 kez el değiştirdi | ≥ 3 | destekliyor | İki plan aynı dönemde sırayla kullanılıyor (51 el değiştirme): plan seçimi bir olaydan çok parametre değerine bağlı (parametre duyarlılığı). |
5. Karşı kanıtlar
- HIGH_VARIANCE (zayıf): Eski planın süre sapması ortalamanın %309'i: ortalama güvenilir değil.
- HIGH_VARIANCE (zayıf): Yeni planın süre sapması ortalamanın %108'i: ortalama güvenilir değil.
- METADATA_GAP (zayıf): Metadata toplama 2026-10-01 tarihinde başladı, değişim 2026-09-27: index/istatistik/modül olayları değerlendirilemedi (olay yok değil, veri yok).
6. Korpus metni önizlemesi
onaylanınca RAG hafızasına bu metin girer (başlığa onaylayan eklenir)Plan change case #P404 | DB: DB-11 | Regression | Confidence: Medium (review pending) Query: (@ServerID int,@DatabaseName nvarchar(?),@Reset bit,@list nvarchar(max))SELECT @list = STRING_AGG(CAST(s.query_text_id AS nvarchar(max)), ?) FROM (SELECT DISTINCT TOP (?) query_text_id FROM perf.Stg_QdsQuery AS g WHERE g.ServerID = @ServerID AND g.DatabaseName = @DatabaseName AND (@Reset = ? OR NOT EXISTS (SELECT ? FROM perf.QdsQuery AS q WHERE q.ServerID = g.ServerID AND q.DatabaseName = g.DatabaseName AND q.query_text_id = g.query_text_id AND q.TextHash IS NOT NULL)) ORDER BY query_text_id DESC) AS s Change: 2026-09-27 22:00 UTC, plan 742 → 2811, pattern: Alternating (51 switches) Impact (Query Store, per execution): duration 8.8 → 225.8 ms (+2473%); CPU 8.2 → 218.7 ms (+2579%); reads 2,606 → 145,000 (+5464%); rows 1 → 1 (+0%) Plan difference: Access only in the old plan: perf.QdsQuery Clustered Index Seek [PK_QdsQuery]; Access only in the new plan: perf.QdsQuery Clustered Index Scan [PK_QdsQuery]; Estimated cost: 0.015 → 0.025; estimated rows: 1 → 1 Candidate cause: PARAM — The two plans alternate in the same period (51 switches): plan choice depends on the parameter value rather than an event (parameter sensitivity). Counter-evidence: HIGH_VARIANCE — The old plan's duration standard deviation is 309% of the average: the average is not reliable. Counter-evidence: HIGH_VARIANCE — The new plan's duration standard deviation is 108% of the average: the average is not reliable. Counter-evidence: METADATA_GAP — Metadata collection started on 2026-10-01 and the change was on 2026-09-27: index, statistics and module events could not be evaluated (no data, not no events). Confidence rationale: Medium: a single candidate (PARAM), not mechanical (no direct link to the plan is proven). Weak counter-evidence: HIGH_VARIANCE, METADATA_GAP. 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.