Plan değişimi P421
Orta Kötüleşme 2,2× BekliyorDB-11 · query_id 36220 · değişim 6.10.2026 15:00 · plan 37017 → 64735 · Geçiş · Sorgu detayı ve analizleri
Güven gerekçesiOrta: birden fazla aday (STATS, GROWTH) — rakip açıklamalar. Zayıf karşı kanıt: HIGH_VARIANCE.
Sorgu metni
(@condition nvarchar(4000),@incTest bit,@types1 nvarchar(4000),@sid int,@dbName nvarchar(4000),@top int)SELECT TOP (@top) c.ChunkId, c.DocId, d.SourceType, d.SourceRef, d.Title, c.Heading, c.Text, CAST(ft.[RANK] AS float) AS Score FROM CONTAINSTABLE(rag.Chunk, Text, @condition) AS ft JOIN rag.Chunk AS c ON c.ChunkId = ft.[KEY] JOIN rag.Document AS d ON d.DocId = c.DocId WHERE (d.IsActive = 1 OR (@incTest = 1 AND d.ExclusionReason = 'TestDb')) AND d.SourceType IN (@types1) AND (@sid IS NULL OR d.ServerID = @sid) AND (@dbName IS NULL OR d.DatabaseName = @dbName) ORDER BY ft.[RANK] DESC, c.ChunkId
1. Etki özeti
| Metrik | Eski plan (37017) | Yeni plan (64735) | Değişim |
|---|---|---|---|
| Çalışma | 2.060 | 12.093 | |
| İptal / hata | 0 / 0 | 0 / 0 | |
| Süre ort. (ms) | 23,5 | 52,4 | +123% |
| Süre maks. (ms) | 348,2 | 344,5 | -1% |
| Süre sapma (ms) | 22,5 | 54,6 | +142% |
| CPU ort. (ms) | 23,4 | 52,3 | +123% |
| CPU maks. (ms) | 340,4 | 288,4 | -15% |
| Mantıksal okuma ort. | 21.438,5 | 46.108,1 | +115% |
| Mantıksal okuma maks. | 82.873,0 | 151.297,0 | +83% |
| Fiziksel okuma | 0,0 | 1,3 | +3382% |
| Yazma | 0,0 | 0,0 | |
| Bellek (KB) | 1.024,0 | 23.079,1 | +2154% |
| Tempdb (KB) | 0,0 | 334,7 | |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 17,4 | 13,1 | -25% |
| Satır maks. | 20,0 | 20,0 | 0% |
| Dönem | 4.10.2026 22:00 → 6.10.2026 02:00 | 6.10.2026 15:00 → 6.10.2026 16:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (37017) | Yeni plan (64735) |
|---|---|---|
| Memory | 1,0 | 1,6 |
| Preemptive | 0,6 | 0,3 |
| CPU | 0,1 | 0,1 |
| Idle | – | 0,0 |
| Other Disk IO | – | 0,0 |
| Buffer IO | 0,0 | 0,0 |
| Lock | 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.Chunk.PK_Chunk | 5.10.2026 08:59 | → 2167/4745 | evet | evet | |
| StatsUpdated | rag.Chunk.PK_Chunk | 5.10.2026 09:59 | → 2399/5069 | evet | evet | |
| StatsUpdated | rag.Chunk.PK_Chunk | 5.10.2026 22:47 | → 2545/5367 | evet | evet | |
| StatsUpdated | rag.Chunk.UQ_Chunk_DocSeq | 5.10.2026 08:59 | → 2593/4745 | evet | evet | |
| StatsUpdated | rag.Chunk.UQ_Chunk_DocSeq | 5.10.2026 09:59 | → 2658/5069 | evet | evet | |
| StatsUpdated | rag.Chunk.UQ_Chunk_DocSeq | 5.10.2026 22:47 | → 2720/5367 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000007_49309088 | 5.10.2026 09:59 | → 2651/5069 | hayır | hayır | |
| StatsUpdated | rag.Chunk._WA_Sys_00000007_49309088 | 5.10.2026 22:47 | → 2733/5413 | hayır | hayır | |
| StatsUpdated | rag.Chunk._WA_Sys_00000003_49309088 | 5.10.2026 08:59 | → 2167/4745 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000003_49309088 | 5.10.2026 09:59 | → 2399/5069 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000003_49309088 | 5.10.2026 22:47 | → 2545/5367 | evet | evet | |
| StatsUpdated | rag.Document.PK_Document | 4.10.2026 21:41 | → 3980/3980 | evet | evet | |
| StatsUpdated | rag.Document.PK_Document | 6.10.2026 01:16 | → 4700/4700 | evet | evet | |
| StatsUpdated | rag.Document.UQ_Document_Source | 4.10.2026 22:07 | → 3982/3982 | evet | evet | |
| StatsUpdated | rag.Document.UQ_Document_Source | 5.10.2026 11:42 | → 4303/4303 | evet | evet | |
| StatsUpdated | rag.Document.UQ_Document_Source | 6.10.2026 04:00 | → 4474/4474 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_0000000A_428392F9 | 5.10.2026 09:04 | → 4189/4189 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_0000000A_428392F9 | 5.10.2026 22:57 | → 4701/4701 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_00000003_428392F9 | 4.10.2026 21:41 | → 3980/3980 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_00000003_428392F9 | 6.10.2026 01:16 | → 4700/4700 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_00000005_428392F9 | 5.10.2026 09:07 | → 4189/4189 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_00000005_428392F9 | 5.10.2026 22:46 | → 4286/4286 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_0000000D_428392F9 | 5.10.2026 09:08 | → 4189/4189 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000D_428392F9 | 5.10.2026 22:52 | → 4699/4699 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_00000008_428392F9 | 5.10.2026 20:06 | → 4304/4304 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_00000008_428392F9 | 6.10.2026 06:13 | → 4187/4187 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000E_428392F9 | 4.10.2026 22:07 | → 3984/3984 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_0000000E_428392F9 | 5.10.2026 21:02 | → 4274/4274 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_0000000E_428392F9 | 6.10.2026 05:48 | → 4480/4480 | evet | evet | |
| StatsUpdated | rag.Document._WA_Sys_00000006_428392F9 | 5.10.2026 09:24 | → 4189/4189 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_00000006_428392F9 | 5.10.2026 22:46 | → 4286/4286 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000F_428392F9 | 5.10.2026 08:58 | → 3981/3981 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000F_428392F9 | 5.10.2026 09:59 | → 4333/4333 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000F_428392F9 | 5.10.2026 22:47 | → 4524/4524 | hayır | hayır | |
| StatsUpdated | rag.Document._WA_Sys_0000000F_428392F9 | 6.10.2026 06:10 | → 4224/4224 | hayır | hayır | |
| TableGrowth | rag.Document | 4.10.2026 00:00 – 6.10.2026 00:00 | 3980|8.65 → 4187|10.59 | bilinmiyor | bilinmiyor | |
| TableGrowth | rag.Chunk | 4.10.2026 00:00 – 6.10.2026 00:00 | 4743|38.45 → 4955|42.83 | bilinmiyor | bilinmiyor |
3. Plan karşılaştırması
- Yalnız eski planda erişim: rag.Chunk Clustered Index Seek [PK_Chunk]; rag.Document Clustered Index Seek [PK_Document]
- Yalnız yeni planda erişim: rag.Document Index Scan [UQ_Document_Source]; rag.Document Clustered Index Seek [PK_Document] (lookup); rag.Chunk Index Seek [UQ_Chunk_DocSeq]; rag.Chunk Clustered Index Seek [PK_Chunk] (lookup)
- Yalnız eski planda join: Nested Loops (Inner Join) ×2
- Yalnız yeni planda join: Hash Match (Inner Join); Nested Loops (Inner Join) ×3
- Tahmini maliyet: 0.022 → 0.384; tahmini satır: 1.1 → 2.2
- Eski planın index'leri
- rag.Chunk.PK_Chunk, rag.Document.PK_Document
- Yeni planın index'leri
- rag.Document.UQ_Document_Source, rag.Document.PK_Document, rag.Chunk.UQ_Chunk_DocSeq, rag.Chunk.PK_Chunk
4. Neden adayları
ölçüm ve eşikle; kesin değildir| Kod | Ölçülen | Eşik | Sonuç | Açıklama |
|---|---|---|---|---|
| STATS | rag.Chunk.PK_Chunk güncellendi 2026-10-05 22:47 (örnekleme %47.4); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk.PK_Chunk 2026-10-05 22:47 güncellendi (örnekleme %47.4); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Chunk.UQ_Chunk_DocSeq güncellendi 2026-10-05 22:47 (örnekleme %50.7); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk.UQ_Chunk_DocSeq 2026-10-05 22:47 güncellendi (örnekleme %50.7); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Chunk._WA_Sys_00000003_49309088 güncellendi 2026-10-05 22:47 (örnekleme %47.4); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk._WA_Sys_00000003_49309088 2026-10-05 22:47 güncellendi (örnekleme %47.4); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document.PK_Document güncellendi 2026-10-06 01:16 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document.PK_Document 2026-10-06 01:16 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document.UQ_Document_Source güncellendi 2026-10-06 04:00 (örnekleme %100); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document.UQ_Document_Source 2026-10-06 04:00 güncellendi (örnekleme %100); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_0000000A_428392F9 güncellendi 2026-10-05 22:57 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_0000000A_428392F9 2026-10-05 22:57 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_00000005_428392F9 güncellendi 2026-10-05 22:46 (örnekleme %100); pencerede 2 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_00000005_428392F9 2026-10-05 22:46 güncellendi (örnekleme %100); pencerede 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_0000000E_428392F9 güncellendi 2026-10-06 05:48 (örnekleme %100); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_0000000E_428392F9 2026-10-06 05:48 güncellendi (örnekleme %100); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | 6 istatistik güncellendi, planlar kullanmıyor | desteklemiyor | Pencerede güncellenen ama iki planın da kullanmadığı istatistikler aday değil: rag.Chunk._WA_Sys_00000007_49309088, rag.Document._WA_Sys_00000003_428392F9, rag.Document._WA_Sys_0000000D_428392F9, rag.Document._WA_Sys_00000008_428392F9, rag.Document._WA_Sys_00000006_428392F9 (+1). | |
| GROWTH | rag.Document: satır 3,980 → 4,187 (%+5), boyut 8.65 → 10.59 MB (%+22) | ≥ %20 | destekliyor | rag.Document eski planın döneminden değişime kadar satır %+5, boyut %+22 değişti (2026-10-04 → 2026-10-06). |
| GROWTH | rag.Chunk: satır 4,743 → 4,955 (%+4), boyut 38.45 → 42.83 MB (%+11) | ≥ %20 | desteklemiyor | rag.Chunk eski planın döneminden değişime kadar satır %+4, boyut %+11 değişti (2026-10-04 → 2026-10-06). |
| WORKLOAD | çalışma başına satır 17.43 → 13.14 (1.33×) | ≥ 2× | desteklemiyor | Çalışma başına satır benzer (17.43 → 13.14): iş yükü farkı yok. |
| 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
- HIGH_VARIANCE (zayıf): Yeni planın süre sapması ortalamanın %104'i: ortalama güvenilir değil.
6. Korpus metni önizlemesi
onaylanınca RAG hafızasına bu metin girer (başlığa onaylayan eklenir)Plan change case #P421 | DB: DB-11 | Regression | Confidence: Medium (review pending) Query: (@condition nvarchar(?),@incTest bit,@types1 nvarchar(?),@sid int,@dbName nvarchar(?),@top int)SELECT TOP (@top) c.ChunkId, c.DocId, d.SourceType, d.SourceRef, d.Title, c.Heading, c.Text, CAST(ft.[RANK] AS float) AS Score FROM CONTAINSTABLE(rag.Chunk, Text, @condition) AS ft JOIN rag.Chunk AS c ON c.ChunkId = ft.[KEY] JOIN rag.Document AS d ON d.DocId = c.DocId WHERE (d.IsActive = ? OR (@incTest = ? AND d.ExclusionReason = ?)) AND d.SourceType IN (@types1) AND (@sid IS NULL OR d.ServerID = @sid) AND (@dbName IS NULL OR d.DatabaseName = @dbName) ORDER BY ft.[RANK] DESC, c.ChunkId Change: 2026-10-06 15:00 UTC, plan 37017 → 64735, pattern: Transition Impact (Query Store, per execution): duration 23.5 → 52.4 ms (+123%); CPU 23.4 → 52.3 ms (+123%); reads 21,439 → 46,108 (+115%); rows 17.43 → 13.14 (-25%) Plan difference: Access only in the old plan: rag.Chunk Clustered Index Seek [PK_Chunk]; rag.Document Clustered Index Seek [PK_Document]; Access only in the new plan: rag.Document Index Scan [UQ_Document_Source]; rag.Document Clustered Index Seek [PK_Document] (lookup); rag.Chunk Index Seek [UQ_Chunk_DocSeq]; rag.Chunk Clustered Index Seek [PK_Chunk] (lookup); Join only in the old plan: Nested Loops (Inner Join) ×2; Join only in the new plan: Hash Match (Inner Join); Nested Loops (Inner Join) ×3 Candidate cause: STATS — Statistic rag.Chunk.PK_Chunk was updated 2026-10-05 22:47 (sampled 47.4%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Chunk.UQ_Chunk_DocSeq was updated 2026-10-05 22:47 (sampled 50.7%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Chunk._WA_Sys_00000003_49309088 was updated 2026-10-05 22:47 (sampled 47.4%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document.PK_Document was updated 2026-10-06 01:16 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document.UQ_Document_Source was updated 2026-10-06 04:00 (sampled 100%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_0000000A_428392F9 was updated 2026-10-05 22:57 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_00000005_428392F9 was updated 2026-10-05 22:46 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_0000000E_428392F9 was updated 2026-10-06 05:48 (sampled 100%); 3 updates in the window; the plans use this statistic. Candidate cause: GROWTH — From the old plan's period to the change, rag.Document rows changed +5% and size +22% (2026-10-04 → 2026-10-06). Counter-evidence: HIGH_VARIANCE — The new plan's duration standard deviation is 104% of the average: the average is not reliable. Confidence rationale: Medium: more than one candidate (STATS, GROWTH) — competing explanations. Weak counter-evidence: HIGH_VARIANCE. 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.