Plan değişimi P466
Orta Kötüleşme 21,7× BekliyorDB-11 · query_id 2132 · rag.usp_EmbedQueue_Dequeue · değişim 30.09.2026 20:00 · plan 2150 → 19379 · Geçiş · Sorgu detayı ve analizleri
Güven gerekçesiOrta: tek aday (WORKLOAD), mekanik değil (plan ile doğrudan bağ kanıtlanmıyor). Zayıf karşı kanıt: METADATA_GAP.
Sorgu metni
(@MaxAttempts int,@BatchSize int,@LeaseSeconds int)WITH c AS (
SELECT TOP (@BatchSize) *
FROM rag.EmbedQueue WITH (READPAST, UPDLOCK, ROWLOCK)
WHERE Status = 'Queued' OR (Status = 'Running' AND LeaseUntilUtc < SYSUTCDATETIME() AND Attempt < @MaxAttempts)
ORDER BY QueueID
)
UPDATE c SET Status = 'Running', Attempt = Attempt + 1, LeaseUntilUtc = DATEADD(second, @LeaseSeconds, SYSUTCDATETIME())
OUTPUT inserted.QueueID, inserted.SourceType, inserted.SourceRef, inserted.Attempt1. Etki özeti
| Metrik | Eski plan (2150) | Yeni plan (19379) | Değişim |
|---|---|---|---|
| Çalışma | 47 | 1.493 | |
| İptal / hata | 0 / 0 | 0 / 0 | |
| Süre ort. (ms) | 0,4 | 8,1 | +2073% |
| Süre maks. (ms) | 2,0 | 53,7 | +2551% |
| Süre sapma (ms) | 0,3 | 4,5 | +1593% |
| CPU ort. (ms) | 0,4 | 8,1 | +2071% |
| CPU maks. (ms) | 2,0 | 53,7 | +2553% |
| Mantıksal okuma ort. | 11,6 | 347,5 | +2902% |
| Mantıksal okuma maks. | 13,0 | 1.553,0 | +11846% |
| Fiziksel okuma | 0,0 | 0,0 | |
| Yazma | 0,0 | 0,0 | |
| Bellek (KB) | 1.024,0 | 1.024,0 | 0% |
| Tempdb (KB) | 1,4 | 0,8 | -43% |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 1,5 | 5,3 | +250% |
| Satır maks. | 2,0 | 100,0 | +4900% |
| Dönem | 30.09.2026 15:00 → 2.10.2026 18:00 | 30.09.2026 20:00 → 2.10.2026 18:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (2150) | Yeni plan (19379) |
|---|---|---|
| CPU | – | 0,0 |
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 | rag.EmbedQueue._WA_Sys_00000008_50D1B250 | 29.09.2026 19:53 | → 8954/8954 | hayır | hayır | |
| StatsUpdated | rag.EmbedQueue._WA_Sys_00000007_50D1B250 | 29.09.2026 21:06 | → 8954/8954 | hayır | hayır |
3. Plan karşılaştırması
- Yalnız eski planda erişim: rag.EmbedQueue Table Update; rag.EmbedQueue Table Scan
- Yalnız yeni planda erişim: rag.EmbedQueue Index Update [UX_EmbedQueue_Pending]; rag.EmbedQueue Clustered Index Update [PK_EmbedQueue]; rag.EmbedQueue Clustered Index Scan [PK_EmbedQueue]
- Yalnız yeni planda uyarı: UnmatchedIndexes
- Tahmini maliyet: 0.025 → 0.228; tahmini satır: 1 → 20
- Eski planın index'leri
- yok
- Yeni planın index'leri
- rag.EmbedQueue.UX_EmbedQueue_Pending, rag.EmbedQueue.PK_EmbedQueue
4. Neden adayları
ölçüm ve eşikle; kesin değildir| Kod | Ölçülen | Eşik | Sonuç | Açıklama |
|---|---|---|---|---|
| STATS | 2 istatistik güncellendi, planlar kullanmıyor | desteklemiyor | Pencerede güncellenen ama iki planın da kullanmadığı istatistikler aday değil: rag.EmbedQueue._WA_Sys_00000008_50D1B250, rag.EmbedQueue._WA_Sys_00000007_50D1B250. | |
| WORKLOAD | çalışma başına satır 1.51 → 5.29 (3.5×) | ≥ 2× | destekliyor | Planlar farklı iş yükü görüyor: çalışma başına satır 1.51 → 5.29. 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
- METADATA_GAP (zayıf): Metadata toplama 2026-10-01 tarihinde başladı, değişim 2026-09-30: 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 #P466 | DB: DB-11 | Regression | Confidence: Medium (review pending) Query: (@MaxAttempts int,@BatchSize int,@LeaseSeconds int)WITH c AS ( SELECT TOP (@BatchSize) * FROM rag.EmbedQueue WITH (READPAST, UPDLOCK, ROWLOCK) WHERE Status = ? OR (Status = ? AND LeaseUntilUtc < SYSUTCDATETIME() AND Attempt < @MaxAttempts) ORDER BY QueueID ) UPDATE c SET Status = ?, Attempt = Attempt + ?, LeaseUntilUtc = DATEADD(second, @LeaseSeconds, SYSUTCDATETIME()) OUTPUT inserted.QueueID, inserted.SourceType, inserted.SourceRef, inserted.Attempt Change: 2026-09-30 20:00 UTC, plan 2150 → 19379, pattern: Transition Impact (Query Store, per execution): duration 0.4 → 8.1 ms (+2073%); CPU 0.4 → 8.1 ms (+2071%); reads 12 → 347 (+2902%); rows 1.51 → 5.29 (+250%) Plan difference: Access only in the old plan: rag.EmbedQueue Table Update; rag.EmbedQueue Table Scan; Access only in the new plan: rag.EmbedQueue Index Update [UX_EmbedQueue_Pending]; rag.EmbedQueue Clustered Index Update [PK_EmbedQueue]; rag.EmbedQueue Clustered Index Scan [PK_EmbedQueue]; Warning only in the new plan: UnmatchedIndexes; Estimated cost: 0.025 → 0.228; estimated rows: 1 → 20 Candidate cause: WORKLOAD — The plans see a different workload: rows per execution 1.51 → 5.29. The plans may have been compiled for different parameters or batch sizes. Counter-evidence: METADATA_GAP — Metadata collection started on 2026-10-01 and the change was on 2026-09-30: index, statistics and module events could not be evaluated (no data, not no events). Confidence rationale: Medium: a single candidate (WORKLOAD), not mechanical (no direct link to the plan is proven). Weak counter-evidence: 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.