@culpritsql/plan-viewer 0.0.0 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +38 -3
- package/pkg/ActualSummary.d.ts +10 -0
- package/pkg/ActualSummary.js +72 -0
- package/pkg/DeadlockGraph.d.ts +9 -0
- package/pkg/DeadlockGraph.js +135 -0
- package/pkg/DeadlockViewer.d.ts +20 -0
- package/pkg/DeadlockViewer.js +62 -0
- package/pkg/DocdbWork.d.ts +7 -0
- package/pkg/DocdbWork.js +37 -0
- package/pkg/NodeDetails.d.ts +15 -0
- package/pkg/NodeDetails.js +161 -0
- package/pkg/OpIcon.d.ts +9 -0
- package/pkg/OpIcon.js +54 -0
- package/pkg/PlanAssessmentNotes.d.ts +3 -0
- package/pkg/PlanAssessmentNotes.js +8 -0
- package/pkg/PlanCanvas.d.ts +47 -0
- package/pkg/PlanCanvas.js +9 -0
- package/pkg/PlanDiagram.d.ts +47 -0
- package/pkg/PlanDiagram.js +534 -0
- package/pkg/PlanDiffViewer.d.ts +31 -0
- package/pkg/PlanDiffViewer.js +325 -0
- package/pkg/PlanInsights.d.ts +6 -0
- package/pkg/PlanInsights.js +100 -0
- package/pkg/PlanObjects.d.ts +7 -0
- package/pkg/PlanObjects.js +138 -0
- package/pkg/PlanOperations.d.ts +8 -0
- package/pkg/PlanOperations.js +114 -0
- package/pkg/PlanRaw.d.ts +4 -0
- package/pkg/PlanRaw.js +35 -0
- package/pkg/PlanSurface.d.ts +22 -0
- package/pkg/PlanSurface.js +66 -0
- package/pkg/PlanTypeSchema.d.ts +5 -0
- package/pkg/PlanTypeSchema.js +62 -0
- package/pkg/PlanView.d.ts +27 -0
- package/pkg/PlanView.js +160 -0
- package/pkg/PlanViewer.d.ts +30 -0
- package/pkg/PlanViewer.js +19 -0
- package/pkg/Prose.d.ts +4 -0
- package/pkg/Prose.js +6 -0
- package/pkg/Sql.d.ts +5 -0
- package/pkg/Sql.js +7 -0
- package/pkg/THIRD-PARTY-LICENSES.txt +9021 -0
- package/pkg/build-report.json +912 -0
- package/pkg/defaults.d.ts +29 -0
- package/pkg/defaults.js +438 -0
- package/pkg/host.d.ts +118 -0
- package/pkg/host.js +593 -0
- package/pkg/index.d.ts +22 -1
- package/pkg/index.js +21 -1
- package/pkg/models/Ability.d.ts +6 -0
- package/pkg/models/ActualSummary.d.ts +16 -0
- package/pkg/models/CachedStatementContext.d.ts +9 -0
- package/pkg/models/CachedStatementIdentity.d.ts +7 -0
- package/pkg/models/ChangeKind.d.ts +3 -0
- package/pkg/models/CleanupEvidence.d.ts +6 -0
- package/pkg/models/CollectionTarget.d.ts +6 -0
- package/pkg/models/CompilationMemory.d.ts +3 -0
- package/pkg/models/CompileHistory.d.ts +13 -0
- package/pkg/models/ConfiguredConnectionIdentity.d.ts +7 -0
- package/pkg/models/Connect.d.ts +22 -0
- package/pkg/models/ConnectionSecurityMode.d.ts +3 -0
- package/pkg/models/ConnectionSecuritySpec.d.ts +4 -0
- package/pkg/models/ConstraintValidation.d.ts +6 -0
- package/pkg/models/DatabaseIdentity.d.ts +5 -0
- package/pkg/models/DatabaseLocation.d.ts +3 -0
- package/pkg/models/DatabaseProduct.d.ts +6 -0
- package/pkg/models/Deadlock.d.ts +23 -0
- package/pkg/models/DeadlockFix.d.ts +16 -0
- package/pkg/models/DeadlockFixKind.d.ts +6 -0
- package/pkg/models/DeadlockPattern.d.ts +3 -0
- package/pkg/models/DeadlockProcess.d.ts +23 -0
- package/pkg/models/DeadlockResource.d.ts +12 -0
- package/pkg/models/DistributionPopulation.d.ts +3 -0
- package/pkg/models/DocdbMetrics.d.ts +7 -0
- package/pkg/models/Engine.d.ts +3 -0
- package/pkg/models/EngineAbilities.d.ts +46 -0
- package/pkg/models/EngineFacts.d.ts +28 -0
- package/pkg/models/EvidencePresentation.d.ts +4 -0
- package/pkg/models/ExecutionProtection.d.ts +3 -0
- package/pkg/models/Guess.d.ts +6 -0
- package/pkg/models/InsightArea.d.ts +6 -0
- package/pkg/models/LocalizedText.d.ts +4 -0
- package/pkg/models/LockHolder.d.ts +3 -0
- package/pkg/models/LogRateGovernanceReason.d.ts +7 -0
- package/pkg/models/Message.d.ts +4 -0
- package/pkg/models/MessageValue.d.ts +4 -0
- package/pkg/models/Metric.d.ts +10 -0
- package/pkg/models/MssqlCatalogIndexColumn.d.ts +3 -0
- package/pkg/models/MssqlCurrentTableType.d.ts +10 -0
- package/pkg/models/MssqlCurrentTypeColumn.d.ts +7 -0
- package/pkg/models/MssqlCurrentTypeIndex.d.ts +4 -0
- package/pkg/models/MssqlCurrentTypeModule.d.ts +4 -0
- package/pkg/models/MssqlCurrentTypeParameter.d.ts +3 -0
- package/pkg/models/MssqlCurrentTypeSchema.d.ts +11 -0
- package/pkg/models/MssqlCurrentTypeSchemaStatus.d.ts +3 -0
- package/pkg/models/MssqlIndexParentKind.d.ts +3 -0
- package/pkg/models/MssqlObjectIdentity.d.ts +7 -0
- package/pkg/models/NativeIdentity.d.ts +3 -0
- package/pkg/models/NativePlanIdentity.d.ts +4 -0
- package/pkg/models/NativeQueryIdentity.d.ts +3 -0
- package/pkg/models/NativeReadContext.d.ts +13 -0
- package/pkg/models/NodeKind.d.ts +3 -0
- package/pkg/models/NodeMatch.d.ts +3 -0
- package/pkg/models/NodeRuntime.d.ts +28 -0
- package/pkg/models/PageServerReadAvailability.d.ts +3 -0
- package/pkg/models/PageServerReadStatistics.d.ts +8 -0
- package/pkg/models/PageServerReadSummary.d.ts +19 -0
- package/pkg/models/PartitionTail.d.ts +6 -0
- package/pkg/models/Plan.d.ts +11 -0
- package/pkg/models/PlanAccessRows.d.ts +13 -0
- package/pkg/models/PlanAutomaticIndex.d.ts +3 -0
- package/pkg/models/PlanChange.d.ts +17 -0
- package/pkg/models/PlanChangedColumn.d.ts +3 -0
- package/pkg/models/PlanConversion.d.ts +4 -0
- package/pkg/models/PlanConversionIssue.d.ts +3 -0
- package/pkg/models/PlanCurrentTypeSchemaView.d.ts +6 -0
- package/pkg/models/PlanDiff.d.ts +13 -0
- package/pkg/models/PlanExecutionMode.d.ts +3 -0
- package/pkg/models/PlanFacts.d.ts +36 -0
- package/pkg/models/PlanHistory.d.ts +6 -0
- package/pkg/models/PlanHistoryKind.d.ts +3 -0
- package/pkg/models/PlanIndexColumns.d.ts +3 -0
- package/pkg/models/PlanIndexHint.d.ts +3 -0
- package/pkg/models/PlanInsight.d.ts +44 -0
- package/pkg/models/PlanInsightShare.d.ts +3 -0
- package/pkg/models/PlanInsights.d.ts +8 -0
- package/pkg/models/PlanKind.d.ts +3 -0
- package/pkg/models/PlanMeasurementRef.d.ts +3 -0
- package/pkg/models/PlanMemoryGrantFeedback.d.ts +15 -0
- package/pkg/models/PlanMemoryGrantFeedbackIssue.d.ts +3 -0
- package/pkg/models/PlanMemoryGrantFeedbackState.d.ts +3 -0
- package/pkg/models/PlanNode.d.ts +7 -0
- package/pkg/models/PlanNodeFacts.d.ts +63 -0
- package/pkg/models/PlanOperatorView.d.ts +5 -0
- package/pkg/models/PlanPageServerIo.d.ts +16 -0
- package/pkg/models/PlanPageServerIoIssue.d.ts +4 -0
- package/pkg/models/PlanPageServerIoView.d.ts +7 -0
- package/pkg/models/PlanPageServerMetric.d.ts +3 -0
- package/pkg/models/PlanParameter.d.ts +10 -0
- package/pkg/models/PlanParameterComparison.d.ts +3 -0
- package/pkg/models/PlanParameterContext.d.ts +15 -0
- package/pkg/models/PlanParameterIssue.d.ts +3 -0
- package/pkg/models/PlanParameterUse.d.ts +4 -0
- package/pkg/models/PlanParameterUseKind.d.ts +3 -0
- package/pkg/models/PlanParameterValueState.d.ts +3 -0
- package/pkg/models/PlanParentRelationship.d.ts +3 -0
- package/pkg/models/PlanRegion.d.ts +7 -0
- package/pkg/models/PlanSampleSource.d.ts +6 -0
- package/pkg/models/PlanScanCompletion.d.ts +8 -0
- package/pkg/models/PlanScanThread.d.ts +3 -0
- package/pkg/models/PlanTemporaryTableUse.d.ts +7 -0
- package/pkg/models/PlanVariant.d.ts +23 -0
- package/pkg/models/PlanView.d.ts +9 -0
- package/pkg/models/PlanWarning.d.ts +3 -0
- package/pkg/models/PlanningStep.d.ts +7 -0
- package/pkg/models/ProductFacts.d.ts +11 -0
- package/pkg/models/QueryCosts.d.ts +62 -0
- package/pkg/models/QueryStat.d.ts +69 -0
- package/pkg/models/QueryTrend.d.ts +7 -0
- package/pkg/models/QueryVariantFamily.d.ts +9 -0
- package/pkg/models/QueryWaitCoverage.d.ts +8 -0
- package/pkg/models/ReadUnit.d.ts +7 -0
- package/pkg/models/Refusal.d.ts +7 -0
- package/pkg/models/RelationalInput.d.ts +5 -0
- package/pkg/models/RelationalInputKind.d.ts +3 -0
- package/pkg/models/RelationalInputProvenance.d.ts +3 -0
- package/pkg/models/RequestEvidence.d.ts +7 -0
- package/pkg/models/RetainedPlanProvenance.d.ts +11 -0
- package/pkg/models/RuntimeDistribution.d.ts +16 -0
- package/pkg/models/RuntimeDistributionIssue.d.ts +3 -0
- package/pkg/models/RuntimeDistributionOrigin.d.ts +3 -0
- package/pkg/models/RuntimeDuration.d.ts +3 -0
- package/pkg/models/RuntimeHistogramBucket.d.ts +8 -0
- package/pkg/models/RuntimeQuantile.d.ts +4 -0
- package/pkg/models/Scenario.d.ts +11 -0
- package/pkg/models/ScenarioKind.d.ts +3 -0
- package/pkg/models/SessionAction.d.ts +6 -0
- package/pkg/models/SessionIdFormat.d.ts +6 -0
- package/pkg/models/Severity.d.ts +3 -0
- package/pkg/models/SharedResourceIdentity.d.ts +11 -0
- package/pkg/models/SharedResourceKind.d.ts +3 -0
- package/pkg/models/SourcePartition.d.ts +8 -0
- package/pkg/models/Spread.d.ts +18 -0
- package/pkg/models/SqlSyntax.d.ts +6 -0
- package/pkg/models/StatementMetrics.d.ts +32 -0
- package/pkg/models/StatementOrigin.d.ts +6 -0
- package/pkg/models/StatementTemporaryWork.d.ts +3 -0
- package/pkg/models/StatisticsFreshness.d.ts +3 -0
- package/pkg/models/TriggerTiming.d.ts +3 -0
- package/pkg/models/Unit.d.ts +3 -0
- package/pkg/models/WaitClass.d.ts +3 -0
- package/pkg/models/WaitMechanism.d.ts +4 -0
- package/pkg/models/WaitSampling.d.ts +3 -0
- package/pkg/models/WaitStat.d.ts +4 -0
- package/pkg/models/WorkerSkew.d.ts +3 -0
- package/pkg/models/WriteLog.d.ts +7 -0
- package/pkg/models/WriteRows.d.ts +7 -0
- package/pkg/styles.css +3463 -0
- package/pkg/types.d.ts +29 -0
- package/pkg/types.js +1 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ChangeKind } from "./ChangeKind.js";
|
|
3
|
+
|
|
4
|
+
export type PlanChange = { kind: ChangeKind,
|
|
5
|
+
/**
|
|
6
|
+
* Node id in plan A, when the change involves a node there.
|
|
7
|
+
*/
|
|
8
|
+
a: number | null,
|
|
9
|
+
/**
|
|
10
|
+
* Node id in plan B, when the change involves a node there.
|
|
11
|
+
*/
|
|
12
|
+
b: number | null, title: string, detail: string | null,
|
|
13
|
+
/**
|
|
14
|
+
* How much this matters: roughly the share of plan cost involved, with changed data access ranked above other
|
|
15
|
+
* structural changes. Changes are sorted by it.
|
|
16
|
+
*/
|
|
17
|
+
weight: number, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Words for the separately timed catalog context; the native bounded metadata stays on PlanFacts once.
|
|
5
|
+
*/
|
|
6
|
+
export type PlanCurrentTypeSchemaView = { title: string, summary: string, limitations: Array<string>, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { NodeMatch } from "./NodeMatch.js";
|
|
3
|
+
import type { PlanChange } from "./PlanChange.js";
|
|
4
|
+
import type { PlanRegion } from "./PlanRegion.js";
|
|
5
|
+
import type { PlanWarning } from "./PlanWarning.js";
|
|
6
|
+
import type { Scenario } from "./Scenario.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Plan structure, measured timings and known optimizer costs. Missing costs are `None`; matching engine cost
|
|
10
|
+
* scales (`comparable`) do not establish that either plan recorded a cost. `matches` pairs corresponding operators,
|
|
11
|
+
* `regions` groups identical parts, and `scenarios` explains conditions that may account for structural differences.
|
|
12
|
+
*/
|
|
13
|
+
export type PlanDiff = { headlines: Array<string>, cost_a: number | null, cost_b: number | null, cost_ratio: number | null, time_a_ms: number | null, time_b_ms: number | null, comparable: boolean, same_shape: boolean, changes: Array<PlanChange>, matches: Array<NodeMatch>, only_a: Array<number>, only_b: Array<number>, warnings_added: Array<PlanWarning>, warnings_removed: Array<PlanWarning>, regions: Array<PlanRegion>, scenarios: Array<Scenario>, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DocdbMetrics } from "./DocdbMetrics.js";
|
|
3
|
+
import type { ExecutionProtection } from "./ExecutionProtection.js";
|
|
4
|
+
import type { MssqlCurrentTypeSchema } from "./MssqlCurrentTypeSchema.js";
|
|
5
|
+
import type { PlanChangedColumn } from "./PlanChangedColumn.js";
|
|
6
|
+
import type { PlanConversion } from "./PlanConversion.js";
|
|
7
|
+
import type { PlanMemoryGrantFeedback } from "./PlanMemoryGrantFeedback.js";
|
|
8
|
+
import type { PlanParameterContext } from "./PlanParameterContext.js";
|
|
9
|
+
import type { PlanSampleSource } from "./PlanSampleSource.js";
|
|
10
|
+
import type { RetainedPlanProvenance } from "./RetainedPlanProvenance.js";
|
|
11
|
+
import type { TriggerTiming } from "./TriggerTiming.js";
|
|
12
|
+
|
|
13
|
+
export type PlanFacts = {
|
|
14
|
+
/**
|
|
15
|
+
* Bounded type metadata observed when this plan was read. It describes the current catalog at its own clock,
|
|
16
|
+
* never the schema used at compilation, live input contents, parameter cardinality or a cause of the plan.
|
|
17
|
+
*/
|
|
18
|
+
current_type_schema?: MssqlCurrentTypeSchema,
|
|
19
|
+
/**
|
|
20
|
+
* Retained native cache evidence. Read ownership is separate from the earlier execution's unknown population.
|
|
21
|
+
*/
|
|
22
|
+
retained?: RetainedPlanProvenance,
|
|
23
|
+
/**
|
|
24
|
+
* Protection confirmed by the native provider for this measured execution. An imported or retained plan cannot
|
|
25
|
+
* establish how Culprit executed it, and therefore leaves this unknown.
|
|
26
|
+
*/
|
|
27
|
+
execution_protection?: ExecutionProtection, constants_redacted?: boolean, estimated_cost_unavailable?: boolean, elapsed_ms?: number | null, cpu_ms?: number | null, planning_ms?: number | null, compile_ms?: number | null, compile_cpu_ms?: number | null, compile_memory_kb?: number | null, memory_desired_kb?: number | null, memory_requested_kb?: number | null, memory_granted_kb?: number | null, memory_max_used_kb?: number | null, memory_grant_wait_ms?: number | null,
|
|
28
|
+
/**
|
|
29
|
+
* Native feedback belongs to this selected plan; it establishes neither parameter causation nor current load.
|
|
30
|
+
*/
|
|
31
|
+
memory_grant_feedback?: PlanMemoryGrantFeedback, udf_elapsed_ms?: number | null, udf_cpu_ms?: number | null, degree_of_parallelism?: number | null, used_threads?: number | null, cardinality_estimator?: number | null, cost_threshold_for_parallelism?: number | null, server_maxdop?: number | null, database_maxdop?: number | null, jit_time_ms?: number | null, trigger_timings: Array<TriggerTiming>, parallelism_blocker?: string | null, optimization_early_abort?: string | null, server_version?: string | null, flavor?: string | null, cost_basis?: string | null, generic_plan_reason?: string | null, statistics_maintenance?: string | null, compiled_parameters?: string | null,
|
|
32
|
+
/**
|
|
33
|
+
* Native parameter metadata from this selected plan, with value availability and a pre-redaction comparison.
|
|
34
|
+
* The plan's retained/execution provenance remains separate; this does not describe a workload population.
|
|
35
|
+
*/
|
|
36
|
+
parameter_context?: PlanParameterContext, memory_grant_warning?: string | null, conversions: Array<PlanConversion>, changed_columns: Array<PlanChangedColumn>, query_hash?: string | null, query_identifier?: string | null, last_run_at?: string, sample_limit_rows?: number, virtual_indexes?: Array<string>, docdb?: DocdbMetrics, sample_source?: PlanSampleSource, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { LocalizedText } from "./LocalizedText.js";
|
|
3
|
+
import type { Plan } from "./Plan.js";
|
|
4
|
+
import type { PlanHistoryKind } from "./PlanHistoryKind.js";
|
|
5
|
+
|
|
6
|
+
export type PlanHistory = { source: LocalizedText, kind: PlanHistoryKind, note: LocalizedText, captured_plan_id?: string, captured_plan?: Plan, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { InsightArea } from "./InsightArea.js";
|
|
3
|
+
import type { PlanIndexHint } from "./PlanIndexHint.js";
|
|
4
|
+
import type { Severity } from "./Severity.js";
|
|
5
|
+
|
|
6
|
+
export type PlanInsight = {
|
|
7
|
+
/**
|
|
8
|
+
* Stable rule id, e.g. `key-lookups`.
|
|
9
|
+
*/
|
|
10
|
+
rule: string, area: InsightArea, severity: Severity,
|
|
11
|
+
/**
|
|
12
|
+
* Share of the plan's work at the operators involved, 0–1. The ranking key after severity.
|
|
13
|
+
*/
|
|
14
|
+
impact: number,
|
|
15
|
+
/**
|
|
16
|
+
* `impact` is a weight the rule gives for ranking, not a measured share of the plan's work: the optimizer
|
|
17
|
+
* stopped searching, a setting, a memory grant, a plan without a run time. It isn't shown as a share and doesn't
|
|
18
|
+
* raise the severity; the rule's floor and cap set it.
|
|
19
|
+
*/
|
|
20
|
+
fixed_weight: boolean,
|
|
21
|
+
/**
|
|
22
|
+
* Operators this is about; the first one is the one to show.
|
|
23
|
+
*/
|
|
24
|
+
nodes: Array<number>,
|
|
25
|
+
/**
|
|
26
|
+
* One plain sentence.
|
|
27
|
+
*/
|
|
28
|
+
title: string,
|
|
29
|
+
/**
|
|
30
|
+
* Why it matters, with the plan's own numbers.
|
|
31
|
+
*/
|
|
32
|
+
detail: string,
|
|
33
|
+
/**
|
|
34
|
+
* What to change.
|
|
35
|
+
*/
|
|
36
|
+
fix: string,
|
|
37
|
+
/**
|
|
38
|
+
* Copy-ready SQL for the fix, when there is a statement to run. Culprit never runs it.
|
|
39
|
+
*/
|
|
40
|
+
fix_sql: string | null,
|
|
41
|
+
/**
|
|
42
|
+
* How to tell the fix worked.
|
|
43
|
+
*/
|
|
44
|
+
verify: string, index_hint?: PlanIndexHint, scan_context?: boolean, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanInsight } from "./PlanInsight.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Insights for one plan plus what this plan can't tell (an estimated plan has no actual rows; MySQL keeps no memory
|
|
6
|
+
* grants), shown next to an empty list so "nothing found" is honest.
|
|
7
|
+
*/
|
|
8
|
+
export type PlanInsights = { items: Array<PlanInsight>, note: string | null, scan_context?: boolean, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanMemoryGrantFeedbackIssue } from "./PlanMemoryGrantFeedbackIssue.js";
|
|
3
|
+
import type { PlanMemoryGrantFeedbackState } from "./PlanMemoryGrantFeedbackState.js";
|
|
4
|
+
|
|
5
|
+
export type PlanMemoryGrantFeedback = { state: PlanMemoryGrantFeedbackState,
|
|
6
|
+
/**
|
|
7
|
+
* Native LastRequestedMemory: granted KB from the prior execution, not the current request or memory use.
|
|
8
|
+
* A canonical integer string preserves values beyond binary64 precision, including an explicitly recorded zero.
|
|
9
|
+
*/
|
|
10
|
+
previous_grant_kb: string | null,
|
|
11
|
+
/**
|
|
12
|
+
* Valid runtime counters were recorded inside this same selected native QueryPlan. This is not a timestamp,
|
|
13
|
+
* request identity, history-group binding or a claim that the execution is still running.
|
|
14
|
+
*/
|
|
15
|
+
runtime_observed: boolean, issues: Array<PlanMemoryGrantFeedbackIssue>, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type PlanMemoryGrantFeedbackState = "not-recorded" | "first-execution" | "accurate-grant" | "disabled-unstable" | "adjusting" | "percentile-adjusting" | "stable" | "unrecognized";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { NodeKind } from "./NodeKind.js";
|
|
3
|
+
import type { NodeRuntime } from "./NodeRuntime.js";
|
|
4
|
+
import type { PlanNodeFacts } from "./PlanNodeFacts.js";
|
|
5
|
+
import type { PlanWarning } from "./PlanWarning.js";
|
|
6
|
+
|
|
7
|
+
export type PlanNode = { id: number, op: string, kind: NodeKind, detail: string | null, object: string | null, index: string | null, seek_predicate: string | null, predicate: string | null, est_rows: number, est_executions: number, act_rows: number | null, act_executions: number | null, rows_read: number | null, table_rows: number | null, subtree_cost: number, self_cost: number, act_time_ms: number | null, runtime: NodeRuntime | null, warnings: Array<PlanWarning>, props: { [key in string]: string }, facts: PlanNodeFacts, children: Array<PlanNode>, };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DocdbMetrics } from "./DocdbMetrics.js";
|
|
3
|
+
import type { MssqlIndexParentKind } from "./MssqlIndexParentKind.js";
|
|
4
|
+
import type { PlanAccessRows } from "./PlanAccessRows.js";
|
|
5
|
+
import type { PlanAutomaticIndex } from "./PlanAutomaticIndex.js";
|
|
6
|
+
import type { PlanConversion } from "./PlanConversion.js";
|
|
7
|
+
import type { PlanExecutionMode } from "./PlanExecutionMode.js";
|
|
8
|
+
import type { PlanIndexColumns } from "./PlanIndexColumns.js";
|
|
9
|
+
import type { PlanParentRelationship } from "./PlanParentRelationship.js";
|
|
10
|
+
import type { PlanScanCompletion } from "./PlanScanCompletion.js";
|
|
11
|
+
import type { PlanTemporaryTableUse } from "./PlanTemporaryTableUse.js";
|
|
12
|
+
import type { RelationalInput } from "./RelationalInput.js";
|
|
13
|
+
|
|
14
|
+
export type PlanNodeFacts = {
|
|
15
|
+
/**
|
|
16
|
+
* A positive native temporary-table operation. None supplies no positive observation; Unknown preserves
|
|
17
|
+
* an explicit temporary-table marker whose purpose is not established by its native wrapper.
|
|
18
|
+
*/
|
|
19
|
+
temporary_table?: PlanTemporaryTableUse,
|
|
20
|
+
/**
|
|
21
|
+
* MySQL/MariaDB's native filesort strategy, independent of temporary-table use. A filesort can stay in
|
|
22
|
+
* memory; this flag establishes neither disk I/O nor measured elapsed cost. Missing stays unknown.
|
|
23
|
+
*/
|
|
24
|
+
filesort?: boolean,
|
|
25
|
+
/**
|
|
26
|
+
* Separately qualified native access estimates and measurements. `PlanNode.rows_read` can contain an
|
|
27
|
+
* estimated fallback and cannot authorize comparisons requiring actual access provenance.
|
|
28
|
+
*/
|
|
29
|
+
access_rows?: PlanAccessRows,
|
|
30
|
+
/**
|
|
31
|
+
* Exact native completion counters for a source-established full physical table scan. Other access paths
|
|
32
|
+
* cannot supply this fact. Completion alone establishes neither the input kind nor its cardinality.
|
|
33
|
+
*/
|
|
34
|
+
scan_completion?: PlanScanCompletion,
|
|
35
|
+
/**
|
|
36
|
+
* The input's native kind and how it was established. A variable-shaped name alone does not distinguish a
|
|
37
|
+
* procedure's table-valued parameter from a local table variable.
|
|
38
|
+
*/
|
|
39
|
+
relational_input?: RelationalInput,
|
|
40
|
+
/**
|
|
41
|
+
* Positive native actual executions from one explicitly serial coordinator counter population. This is
|
|
42
|
+
* neither an estimated count nor the absence of observed parallel workers. Consumers must additionally
|
|
43
|
+
* match the operator's actual execution count within an exactly representable range before normalizing.
|
|
44
|
+
*/
|
|
45
|
+
serial_execution_count?: string,
|
|
46
|
+
/**
|
|
47
|
+
* Native logical join semantics. Unknown or absent semantics cannot authorize an inner-join diagnosis.
|
|
48
|
+
*/
|
|
49
|
+
inner_join?: boolean,
|
|
50
|
+
/**
|
|
51
|
+
* Native build-input ownership for a nonadaptive inner hash join. This names its original direct child,
|
|
52
|
+
* not an inferred role from a generic join shape. Serial execution and complete input remain independent.
|
|
53
|
+
*/
|
|
54
|
+
hash_build_input?: number, estimated_rows_unavailable?: boolean,
|
|
55
|
+
/**
|
|
56
|
+
* The native operator's declared parallel execution context. This does not count observed workers or
|
|
57
|
+
* establish an actual serial execution population. Missing or malformed native declarations stay unknown.
|
|
58
|
+
*/
|
|
59
|
+
parallel_operator?: boolean, parallel_threads?: number | null, measured_kept_share?: number | null, estimated_filtered_percent?: number | null, selectivity_guess?: string | null, partition_pruning?: string | null, partition_parent?: string | null, table_kind?: string, index_method?: string | null,
|
|
60
|
+
/**
|
|
61
|
+
* Only an original owned native Showplan Object IndexKind can establish this kind. Current catalog names cannot.
|
|
62
|
+
*/
|
|
63
|
+
mssql_index_parent_kind?: MssqlIndexParentKind, parent_relationship?: PlanParentRelationship | null, actual_execution_mode?: PlanExecutionMode | null, estimated_execution_mode?: PlanExecutionMode | null, estimated_rows_per_process?: number | null, disk_usage_kb?: number | null, sort_space_kb?: number | null, hash_batches?: number | null, hash_aggregate_batches?: number | null, heap_fetches?: number | null, lossy_heap_blocks?: number | null, exact_heap_blocks?: number | null, rows_removed_by_recheck?: number | null, estimated_rows_without_goal?: number | null, workers_planned?: number | null, workers_launched?: number | null, sort_merge_passes?: number | null, sort_on_disk?: boolean | null, exchange_spill?: boolean | null, storage?: string | null, join_buffer?: string | null, join_buffer_join_type?: string | null, table_alias?: string | null, join_filter?: string | null, subplan_name?: string | null, aggregate_strategy?: string | null, table_missing?: string | null, many_to_many?: boolean | null, anti_join?: boolean | null, dependent?: boolean | null, cacheable?: boolean | null, functions_in_seek_only?: boolean | null, expression_cache: boolean, conditions: Array<string>, conversions: Array<PlanConversion>, user_functions: Array<string>, columns_without_statistics: Array<string>, used_key_parts?: Array<string>, possible_index_names: Array<string>, possible_index_columns?: Array<PlanIndexColumns> | null, table_indexes?: Array<PlanIndexColumns> | null, automatic_index?: PlanAutomaticIndex | null, estimated_row_bytes?: number | null, rows_produced_per_join?: number | null, output_columns?: Array<string> | null, docdb?: DocdbMetrics, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Guess } from "./Guess.js";
|
|
3
|
+
import type { PlanPageServerIoView } from "./PlanPageServerIoView.js";
|
|
4
|
+
|
|
5
|
+
export type PlanOperatorView = { id: number, page_server_io?: PlanPageServerIoView, runs: number | null, estimated_rows: number | null, estimated_rows_for_runs: number | null, rows_out: number | null, rows_read: number | null, misestimate: number | null, guess: Guess | null, uncosted: boolean, layout_own_share: number, layout_subtree_share: number, cost_share: number | null, subtree_cost_share: number | null, own_ms: number | null, time_share: number | null, subtree_time_share: number | null, no_share_reason: string | null, finding_no_share_reason: string | null, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanPageServerIoIssue } from "./PlanPageServerIoIssue.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Exact page totals across this operator's unique native threads. Demand, read-ahead and LOB remain independent.
|
|
6
|
+
* These counters have no independently established UTC interval, reset marker or execution-group identity.
|
|
7
|
+
*/
|
|
8
|
+
export type PlanPageServerIo = {
|
|
9
|
+
/**
|
|
10
|
+
* Runtime rows retained up to the existing thread policy. ThreadLimit means the population is incomplete.
|
|
11
|
+
*/
|
|
12
|
+
threads_observed: number, reads: string | null, read_aheads: string | null, lob_reads: string | null, lob_read_aheads: string | null,
|
|
13
|
+
/**
|
|
14
|
+
* Bounded, deduplicated reasons for unavailable totals; never the malformed native text.
|
|
15
|
+
*/
|
|
16
|
+
issues: Array<PlanPageServerIoIssue>, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanPageServerMetric } from "./PlanPageServerMetric.js";
|
|
3
|
+
|
|
4
|
+
export type PlanPageServerIoIssue = { "kind": "missing-counter", metric: PlanPageServerMetric, } | { "kind": "invalid-counter", metric: PlanPageServerMetric, } | { "kind": "counter-overflow", metric: PlanPageServerMetric, } | { "kind": "invalid-thread" } | { "kind": "duplicate-thread" } | { "kind": "thread-limit" } | { "kind": "multiple-populations" };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Metric } from "./Metric.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One operator's native page-server counters, formatted once without a statement-wide sum or cost verdict.
|
|
6
|
+
*/
|
|
7
|
+
export type PlanPageServerIoView = { metrics: Array<Metric>, limitations: Array<string>, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanParameterComparison } from "./PlanParameterComparison.js";
|
|
3
|
+
import type { PlanParameterValueState } from "./PlanParameterValueState.js";
|
|
4
|
+
|
|
5
|
+
export type PlanParameter = { name: string | null, data_type: string | null, compiled: PlanParameterValueState, runtime: PlanParameterValueState, comparison: PlanParameterComparison,
|
|
6
|
+
/**
|
|
7
|
+
* A provider compared both original values under one supported declared integer type and native range.
|
|
8
|
+
* Values and value hashes are discarded. None preserves unsupported types, missing or unqualified values.
|
|
9
|
+
*/
|
|
10
|
+
integer_values_equal?: boolean, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanParameter } from "./PlanParameter.js";
|
|
3
|
+
import type { PlanParameterIssue } from "./PlanParameterIssue.js";
|
|
4
|
+
import type { PlanParameterUse } from "./PlanParameterUse.js";
|
|
5
|
+
|
|
6
|
+
export type PlanParameterContext = {
|
|
7
|
+
/**
|
|
8
|
+
* The selected actual statement's native cache-use verdict, not a cache lifetime/count inference.
|
|
9
|
+
* False does not independently prove compilation time, a new incarnation, or harmful reuse.
|
|
10
|
+
*/
|
|
11
|
+
retrieved_from_cache?: boolean, parameters: Array<PlanParameter>,
|
|
12
|
+
/**
|
|
13
|
+
* Exact native access-node relationships, never bindings reconstructed from display SQL.
|
|
14
|
+
*/
|
|
15
|
+
uses: Array<PlanParameterUse>, issues: Array<PlanParameterIssue>, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type PlanParameterIssue = "duplicate-name" | "invalid-metadata" | "parameter-limit" | "unsupported-use" | "ambiguous-use" | "use-limit" | "metadata-limit" | "unbound-statement";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanParameterUseKind } from "./PlanParameterUseKind.js";
|
|
3
|
+
|
|
4
|
+
export type PlanParameterUse = { parameter_index: number, node_id: number, kind: PlanParameterUseKind, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type PlanParentRelationship = { "kind": "outer" } | { "kind": "inner" } | { "kind": "sub-plan" } | { "kind": "init-plan" } | { "kind": "cte" } | { "kind": "other", "value": string };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Operators that do the same thing in both plans: the same step on the same table and index, connected to each other.
|
|
5
|
+
* Diagrams tint each region alike on both sides, the way SSMS highlights similar operations.
|
|
6
|
+
*/
|
|
7
|
+
export type PlanRegion = { a: Array<number>, b: Array<number>, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanScanThread } from "./PlanScanThread.js";
|
|
3
|
+
|
|
4
|
+
export type PlanScanCompletion = {
|
|
5
|
+
/**
|
|
6
|
+
* Native operator parallelism, independent of which worker counters happened to be present.
|
|
7
|
+
*/
|
|
8
|
+
parallel: boolean | null, threads: Array<PlanScanThread>, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A temporary intermediate result explicitly identified by the selected native plan. This records its
|
|
5
|
+
* operation, never storage placement, allocation size, spill duration or a memory-limit cause.
|
|
6
|
+
*/
|
|
7
|
+
export type PlanTemporaryTableUse = "grouping" | "duplicate-removal" | "ordering" | "materialization" | "unknown";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { NativePlanIdentity } from "./NativePlanIdentity.js";
|
|
3
|
+
import type { PageServerReadSummary } from "./PageServerReadSummary.js";
|
|
4
|
+
|
|
5
|
+
export type PlanVariant = { native_identity?: NativePlanIdentity, id: string, executions: number, total_time_ms: number, mean_time_ms: number, first_seen: string | null, last_seen: string | null,
|
|
6
|
+
/**
|
|
7
|
+
* Native forcing state when the source established it; an absent observation is not false.
|
|
8
|
+
*/
|
|
9
|
+
is_forced: boolean | null, min_time_ms: number | null, max_time_ms: number | null, stddev_time_ms: number | null,
|
|
10
|
+
/**
|
|
11
|
+
* The parameter values this plan was compiled for, as the engine reports them (SQL Server showplan).
|
|
12
|
+
*/
|
|
13
|
+
compiled: string | null,
|
|
14
|
+
/**
|
|
15
|
+
* CPU time and logical reads across its runs, where the source keeps them per plan (Query Store): whether a
|
|
16
|
+
* slower plan does more work, or only waited longer while it ran.
|
|
17
|
+
*/
|
|
18
|
+
cpu_time_ms: number | null, logical_reads: number | null,
|
|
19
|
+
/**
|
|
20
|
+
* Remote-page statistics for this native plan and execution population, independent from local/physical
|
|
21
|
+
* reads and runtime timing. Multiple fragments retain only explicitly derived statistics.
|
|
22
|
+
*/
|
|
23
|
+
page_server_reads?: PageServerReadSummary, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ActualSummary } from "./ActualSummary.js";
|
|
3
|
+
import type { PlanCurrentTypeSchemaView } from "./PlanCurrentTypeSchemaView.js";
|
|
4
|
+
import type { PlanInsightShare } from "./PlanInsightShare.js";
|
|
5
|
+
import type { PlanKind } from "./PlanKind.js";
|
|
6
|
+
import type { PlanMeasurementRef } from "./PlanMeasurementRef.js";
|
|
7
|
+
import type { PlanOperatorView } from "./PlanOperatorView.js";
|
|
8
|
+
|
|
9
|
+
export type PlanView = { current_type_schema?: PlanCurrentTypeSchemaView, kind: PlanKind, query: PlanMeasurementRef | null, focus_checks: Array<string>, cost_basis: number, weighed: boolean, states_shares: boolean, real_work: boolean, hottest_cost: number | null, hottest_time: number | null, timed_total_ms: number | null, cost_note: string | null, time_note: string | null, actual: ActualSummary | null, nodes: Array<PlanOperatorView>, insights: Array<PlanInsightShare>, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What the engine calls finding a statement's plan before running it: SQL Server compiles, the others plan. Messages
|
|
5
|
+
* `select` on it (`{planning, select, compiling {..} other {..}}`), so another language's words can agree with it.
|
|
6
|
+
*/
|
|
7
|
+
export type PlanningStep = "planning" | "compiling";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { DatabaseProduct } from "./DatabaseProduct.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The same product identities and recognition rules consumed by the UI.
|
|
6
|
+
*/
|
|
7
|
+
export type ProductFacts = { id: DatabaseProduct, label: string,
|
|
8
|
+
/**
|
|
9
|
+
* Message key: the native plan formats a person can open without a connection.
|
|
10
|
+
*/
|
|
11
|
+
plan_format: string, prefix: string | null, };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { CompileHistory } from "./CompileHistory.js";
|
|
3
|
+
import type { DocdbMetrics } from "./DocdbMetrics.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What a statement's runs cost besides elapsed time, as far as the engine keeps it. Totals cover all its runs in the
|
|
7
|
+
* workload's window (or since its statistics began, for sources that keep running totals).
|
|
8
|
+
*/
|
|
9
|
+
export type QueryCosts = {
|
|
10
|
+
/**
|
|
11
|
+
* Runs that ended in an error (SQL Server Query Store "exception"; MySQL/MariaDB statements that raised errors).
|
|
12
|
+
*/
|
|
13
|
+
failed: number | null,
|
|
14
|
+
/**
|
|
15
|
+
* Runs the client cancelled, almost always a command timeout (SQL Server Query Store "aborted").
|
|
16
|
+
*/
|
|
17
|
+
aborted: number | null,
|
|
18
|
+
/**
|
|
19
|
+
* Average duration of the cancelled runs: close to 30 s is a client's default timeout.
|
|
20
|
+
*/
|
|
21
|
+
aborted_mean_ms: number | null,
|
|
22
|
+
/**
|
|
23
|
+
* Warnings raised (MySQL/MariaDB): truncations, conversions, deprecated syntax.
|
|
24
|
+
*/
|
|
25
|
+
warnings: number | null,
|
|
26
|
+
/**
|
|
27
|
+
* The error its recent failed runs raised most, as a code and a fixed name ("1205 lock wait timeout"); never the
|
|
28
|
+
* server's message, which can carry row values.
|
|
29
|
+
*/
|
|
30
|
+
top_error: string | null,
|
|
31
|
+
/**
|
|
32
|
+
* Time spent planning (PostgreSQL with pg_stat_statements.track_planning) or compiling (SQL Server), all runs.
|
|
33
|
+
*/
|
|
34
|
+
plan_ms: number | null,
|
|
35
|
+
/**
|
|
36
|
+
* How many times it was planned or compiled.
|
|
37
|
+
*/
|
|
38
|
+
plans: number | null,
|
|
39
|
+
/**
|
|
40
|
+
* Time spent JIT-compiling expressions (PostgreSQL 15+), all runs. Part of execution time.
|
|
41
|
+
*/
|
|
42
|
+
jit_ms: number | null,
|
|
43
|
+
/**
|
|
44
|
+
* Functions JIT-compiled, all runs.
|
|
45
|
+
*/
|
|
46
|
+
jit_functions: number | null,
|
|
47
|
+
/**
|
|
48
|
+
* Write-ahead (PostgreSQL 13+) or transaction log (SQL Server 2017+) bytes it wrote, all runs.
|
|
49
|
+
*/
|
|
50
|
+
log_bytes: number | null,
|
|
51
|
+
/**
|
|
52
|
+
* Its part of all log bytes written by statements in this database.
|
|
53
|
+
*/
|
|
54
|
+
log_share: number | null,
|
|
55
|
+
/**
|
|
56
|
+
* Full-page images among its WAL records (PostgreSQL): high after every checkpoint.
|
|
57
|
+
*/
|
|
58
|
+
log_full_pages: number | null,
|
|
59
|
+
/**
|
|
60
|
+
* Estimated bytes per returned row, from the plan's output width (SQL Server AvgRowSize, PostgreSQL width).
|
|
61
|
+
*/
|
|
62
|
+
row_bytes: number | null, compile_history: CompileHistory | null, docdb?: DocdbMetrics, };
|