Plan değişimi P438
Düşük İyileşme 1,4× BekliyorDB-11 · query_id 65150 · değişim 7.10.2026 05:00 · plan 64747 → 64778 · Geçiş · Sorgu detayı ve analizleri
Güven gerekçesiDüşük: güçlü karşı kanıt (SAME_SHAPE).
Sorgu metni
(@incTest bit,@types1 nvarchar(4000),@sid int,@dbName nvarchar(4000),@tag nvarchar(4000),@model nvarchar(4000),@q vector(1024),@top int)SELECT TOP (@top) c.ChunkId, c.DocId, d.SourceType, d.SourceRef, d.Title, c.Heading, c.Text,
VECTOR_DISTANCE('cosine', c.Embedding, @q) AS Score
FROM rag.Chunk AS c
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)
AND (@tag IS NULL OR EXISTS (SELECT 1 FROM STRING_SPLIT(d.Tags, ',') AS t WHERE LTRIM(RTRIM(t.value)) = @tag)) AND c.Embedding IS NOT NULL AND c.EmbeddingModel = @model
ORDER BY Score, c.ChunkId1. Etki özeti
| Metrik | Eski plan (64747) | Yeni plan (64778) | Değişim |
|---|---|---|---|
| Çalışma | 30.063 | 13.285 | |
| İptal / hata | 1 / 0 | 0 / 0 | |
| Süre ort. (ms) | 33,9 | 24,3 | -28% |
| Süre maks. (ms) | 160,3 | 346,6 | +116% |
| Süre sapma (ms) | 35,3 | 32,0 | -9% |
| CPU ort. (ms) | 33,8 | 24,3 | -28% |
| CPU maks. (ms) | 160,3 | 345,7 | +116% |
| Mantıksal okuma ort. | 14.589,2 | 10.653,3 | -27% |
| Mantıksal okuma maks. | 38.649,0 | 38.626,0 | 0% |
| Fiziksel okuma | 1,0 | 0,7 | -32% |
| Yazma | 0,0 | 0,0 | +265% |
| Bellek (KB) | 12.156,2 | 8.622,6 | -29% |
| Tempdb (KB) | 326,2 | 213,9 | -34% |
| DOP | 1,0 | 1,0 | 0% |
| Satır ort. | 18,4 | 17,7 | -4% |
| Satır maks. | 20,0 | 20,0 | 0% |
| Dönem | 6.10.2026 16:00 → 7.10.2026 06:00 | 7.10.2026 05:00 → 7.10.2026 11:00 |
Bekleme kategorileri
ms / çalışma| Bekleme kategorisi | Eski plan (64747) | Yeni plan (64778) |
|---|---|---|
| Memory | 0,6 | 0,4 |
| CPU | 0,0 | 0,0 |
| Other Disk 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.PK_Chunk | 6.10.2026 22:04 | → 2081/4955 | 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.UQ_Chunk_DocSeq | 6.10.2026 22:04 | → 2612/4955 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000007_49309088 | 5.10.2026 09:59 | → 2651/5069 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000007_49309088 | 5.10.2026 22:47 | → 2733/5413 | evet | evet | |
| StatsUpdated | rag.Chunk._WA_Sys_00000007_49309088 | 6.10.2026 22:05 | → 2609/4955 | evet | evet | |
| 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.Chunk._WA_Sys_00000003_49309088 | 6.10.2026 22:04 | → 2081/4955 | evet | evet | |
| StatsUpdated | rag.Document.PK_Document | 6.10.2026 01:16 | → 4700/4700 | 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_0000000A_428392F9 | 6.10.2026 19:19 | → 4189/4189 | evet | evet | |
| 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_00000005_428392F9 | 6.10.2026 22:02 | → 4187/4187 | 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 | 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_00000006_428392F9 | 6.10.2026 22:02 | → 4187/4187 | 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 | |
| StatsUpdated | rag.Document._WA_Sys_00000007_428392F9 | 6.10.2026 22:07 | → 4187/4187 | evet | evet | |
| TableGrowth | rag.Document | 6.10.2026 00:00 – 7.10.2026 00:00 | 4187|10.59 → 4225|11.34 | bilinmiyor | bilinmiyor | |
| TableGrowth | rag.Chunk | 6.10.2026 00:00 – 7.10.2026 00:00 | 4955|42.83 → 5235|42.70 | bilinmiyor | bilinmiyor |
3. Plan karşılaştırması
- Operatör düzeyinde fark yok: süre farkı büyük olasılıkla beklemeden ya da parametre değerinden.
- Eski planın index'leri
- rag.Document.UQ_Document_Source, rag.Document.PK_Document, rag.Chunk.UQ_Chunk_DocSeq, rag.Chunk.PK_Chunk
- 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-06 22:04 (örnekleme %42); pencerede 4 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk.PK_Chunk 2026-10-06 22:04 güncellendi (örnekleme %42); pencerede 4 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Chunk.UQ_Chunk_DocSeq güncellendi 2026-10-06 22:04 (örnekleme %52.7); pencerede 4 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk.UQ_Chunk_DocSeq 2026-10-06 22:04 güncellendi (örnekleme %52.7); pencerede 4 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Chunk._WA_Sys_00000007_49309088 güncellendi 2026-10-06 22:05 (örnekleme %52.7); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk._WA_Sys_00000007_49309088 2026-10-06 22:05 güncellendi (örnekleme %52.7); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Chunk._WA_Sys_00000003_49309088 güncellendi 2026-10-06 22:04 (örnekleme %42); pencerede 4 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Chunk._WA_Sys_00000003_49309088 2026-10-06 22:04 güncellendi (örnekleme %42); pencerede 4 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document.PK_Document güncellendi 2026-10-06 01:16 (örnekleme %100) | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document.PK_Document 2026-10-06 01:16 güncellendi (örnekleme %100); planlar bu istatistiği kullanıyor. |
| STATS | rag.Document.UQ_Document_Source güncellendi 2026-10-06 04:00 (örnekleme %100); pencerede 2 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 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_0000000A_428392F9 güncellendi 2026-10-06 19:19 (örnekleme %100); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_0000000A_428392F9 2026-10-06 19:19 güncellendi (örnekleme %100); pencerede 3 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_00000005_428392F9 güncellendi 2026-10-06 22:02 (örnekleme %100); pencerede 3 güncelleme | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_00000005_428392F9 2026-10-06 22:02 güncellendi (örnekleme %100); pencerede 3 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 2 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 2 güncelleme; planlar bu istatistiği kullanıyor. |
| STATS | rag.Document._WA_Sys_00000007_428392F9 güncellendi 2026-10-06 22:07 (örnekleme %100) | değişimden önceki 48 saat | destekliyor | İstatistik rag.Document._WA_Sys_00000007_428392F9 2026-10-06 22:07 güncellendi (örnekleme %100); planlar bu istatistiği kullanıyor. |
| STATS | 5 istatistik güncellendi, planlar kullanmıyor | desteklemiyor | Pencerede güncellenen ama iki planın da kullanmadığı istatistikler aday değil: rag.Document._WA_Sys_00000003_428392F9, rag.Document._WA_Sys_0000000D_428392F9, rag.Document._WA_Sys_00000008_428392F9, rag.Document._WA_Sys_00000006_428392F9, rag.Document._WA_Sys_0000000F_428392F9. | |
| GROWTH | rag.Document: satır 4,187 → 4,225 (%+1), boyut 10.59 → 11.34 MB (%+7) | ≥ %20 | desteklemiyor | rag.Document eski planın döneminden değişime kadar satır %+1, boyut %+7 değişti (2026-10-06 → 2026-10-07). |
| GROWTH | rag.Chunk: satır 4,955 → 5,235 (%+6), boyut 42.83 → 42.7 MB (%0) | ≥ %20 | desteklemiyor | rag.Chunk eski planın döneminden değişime kadar satır %+6, boyut %0 değişti (2026-10-06 → 2026-10-07). |
| WORKLOAD | çalışma başına satır 18.44 → 17.65 (1.04×) | ≥ 2× | desteklemiyor | Çalışma başına satır benzer (18.44 → 17.65): 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): Eski planın süre sapması ortalamanın %104'i: ortalama güvenilir değil.
- HIGH_VARIANCE (zayıf): Yeni planın süre sapması ortalamanın %132'i: ortalama güvenilir değil.
- TREND_BEFORE (zayıf): Eski plan değişimden önce zaten kayıyordu (ort. 34.9 → 7.8 ms): süre farkının bir kısmı plan değişiminden bağımsız.
- SAME_SHAPE (güçlü): İki planın operatör ağacı aynı (operatörler, tablolar, index'ler): plan değişmemiş; fark yalnız derlenen parametre değerleri ve satır tahminlerinde. Yavaşlık plan seçiminden değil, bu parametre değerinin işlediği veri miktarından ya da beklemeden kaynaklanıyor olabilir.
6. Korpus metni önizlemesi
onaylanınca RAG hafızasına bu metin girer (başlığa onaylayan eklenir)Plan change case #P438 | DB: DB-11 | Improvement | Confidence: Low (review pending) Query: (@incTest bit,@types1 nvarchar(?),@sid int,@dbName nvarchar(?),@tag nvarchar(?),@model nvarchar(?),@q vector(?),@top int)SELECT TOP (@top) c.ChunkId, c.DocId, d.SourceType, d.SourceRef, d.Title, c.Heading, c.Text, VECTOR_DISTANCE(?, c.Embedding, @q) AS Score FROM rag.Chunk AS c 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) AND (@tag IS NULL OR EXISTS (SELECT ? FROM STRING_SPLIT(d.Tags, ?) AS t WHERE LTRIM(RTRIM(t.value)) = @tag)) AND c.Embedding IS NOT NULL AND c.EmbeddingModel = @model ORDER BY Score, c.ChunkId Change: 2026-10-07 05:00 UTC, plan 64747 → 64778, pattern: Transition Impact (Query Store, per execution): duration 33.9 → 24.3 ms (-28%); CPU 33.8 → 24.3 ms (-28%); reads 14,589 → 10,653 (-27%); rows 18.44 → 17.65 (-4%); aborted 1 → 0 Plan difference: no operator-level difference Candidate cause: STATS — Statistic rag.Chunk.PK_Chunk was updated 2026-10-06 22:04 (sampled 42%); 4 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Chunk.UQ_Chunk_DocSeq was updated 2026-10-06 22:04 (sampled 52.7%); 4 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Chunk._WA_Sys_00000007_49309088 was updated 2026-10-06 22:05 (sampled 52.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-06 22:04 (sampled 42%); 4 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%); the plans use this statistic. Candidate cause: STATS — Statistic rag.Document.UQ_Document_Source was updated 2026-10-06 04:00 (sampled 100%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_0000000A_428392F9 was updated 2026-10-06 19:19 (sampled 100%); 3 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_00000005_428392F9 was updated 2026-10-06 22:02 (sampled 100%); 3 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%); 2 updates in the window; the plans use this statistic. Candidate cause: STATS — Statistic rag.Document._WA_Sys_00000007_428392F9 was updated 2026-10-06 22:07 (sampled 100%); the plans use this statistic. Counter-evidence: HIGH_VARIANCE — The old plan's duration standard deviation is 104% of the average: the average is not reliable. Counter-evidence: HIGH_VARIANCE — The new plan's duration standard deviation is 132% of the average: the average is not reliable. Counter-evidence: TREND_BEFORE — The old plan was already drifting before the change (avg 34.9 → 7.8 ms): part of the duration difference is independent of the plan change. Counter-evidence: SAME_SHAPE — The two plans have the same operator tree (operators, tables, indexes): the plan did not change; the difference is only in the compiled parameter values and row estimates. The slowness may come from the amount of data this parameter value processes or from waits, not from plan choice. Confidence rationale: Low: strong counter-evidence (SAME_SHAPE). 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.