Skip to content

Commit bc174ff

Browse files
Fix RetrievedFromCache always showing False (#88) (#89)
RetrievedFromCache is an attribute on the StmtSimple XML element, but the parser was reading it from the child QueryPlan element where it never exists. Changed to read from stmtEl instead of queryPlanEl. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e4cf51 commit bc174ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PlanViewer.Core/Services/ShowPlanParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ private static void ParseQueryPlanElements(PlanStatement stmt, XElement stmtEl,
409409
stmt.CachedPlanSizeKB = ParseLong(queryPlanEl.Attribute("CachedPlanSize")?.Value);
410410
stmt.DegreeOfParallelism = (int)ParseDouble(queryPlanEl.Attribute("DegreeOfParallelism")?.Value);
411411
stmt.NonParallelPlanReason = queryPlanEl.Attribute("NonParallelPlanReason")?.Value;
412-
stmt.RetrievedFromCache = queryPlanEl.Attribute("RetrievedFromCache")?.Value is "true" or "1";
412+
stmt.RetrievedFromCache = stmtEl.Attribute("RetrievedFromCache")?.Value is "true" or "1";
413413
stmt.CompileTimeMs = ParseLong(queryPlanEl.Attribute("CompileTime")?.Value);
414414
stmt.CompileMemoryKB = ParseLong(queryPlanEl.Attribute("CompileMemory")?.Value);
415415
stmt.CompileCPUMs = ParseLong(queryPlanEl.Attribute("CompileCPU")?.Value);

0 commit comments

Comments
 (0)