public override Task <ExecutionPlanItemCollection> ExplainPlanAsync(StatementExecutionModel executionModel, CancellationToken cancellationToken) { var rootItem = new ExecutionPlanItem(); SetBasePlanItemData(rootItem); var planItemCollection = new ExecutionPlanItemCollection(); planItemCollection.Add(rootItem); planItemCollection.SetAllItems(); return(Task.FromResult(planItemCollection)); }
private static void SetBasePlanItemData(ExecutionPlanItem planItem) { planItem.Operation = "Operation"; planItem.Options = "Options"; planItem.Optimizer = "Optimizer"; planItem.ObjectOwner = "ObjectOwner"; planItem.ObjectName = "ObjectName"; planItem.ObjectAlias = "ObjectAlias"; planItem.ObjectType = "ObjectType"; planItem.Cost = 1234; planItem.Cardinality = 5678; planItem.Bytes = 9123; planItem.PartitionStart = "PartitionStart"; planItem.PartitionStop = "PartitionStop"; planItem.Distribution = "Distribution"; planItem.CpuCost = 9876; planItem.IoCost = 123; planItem.TempSpace = 54321; planItem.AccessPredicates = "AccessPredicates"; planItem.FilterPredicates = "FilterPredicates"; planItem.Time = TimeSpan.FromSeconds(144); planItem.QueryBlockName = "QueryBlockName"; planItem.Other = null; }