@culpritsql/plans 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +153 -2
- package/package.json +46 -4
- package/pkg/THIRD-PARTY-LICENSES.txt +9021 -0
- package/pkg/build-report.json +588 -0
- package/pkg/index.d.ts +26 -0
- package/pkg/index.js +37 -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/CollectionStop.d.ts +3 -0
- package/pkg/models/CollectionTarget.d.ts +6 -0
- package/pkg/models/CompareContext.d.ts +12 -0
- package/pkg/models/ConfiguredConnectionIdentity.d.ts +7 -0
- package/pkg/models/DatabaseIdentity.d.ts +5 -0
- package/pkg/models/DatabaseLocation.d.ts +3 -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/DeliveryProblem.d.ts +3 -0
- package/pkg/models/DocdbMetrics.d.ts +7 -0
- package/pkg/models/Engine.d.ts +3 -0
- package/pkg/models/Error.d.ts +5 -0
- package/pkg/models/ErrorCode.d.ts +3 -0
- package/pkg/models/ErrorDetail.d.ts +10 -0
- package/pkg/models/ExecutionProtection.d.ts +3 -0
- package/pkg/models/ExportFile.d.ts +7 -0
- package/pkg/models/ExportFormat.d.ts +3 -0
- package/pkg/models/ExportNote.d.ts +11 -0
- package/pkg/models/ExportOptions.d.ts +12 -0
- package/pkg/models/Guess.d.ts +6 -0
- package/pkg/models/InsightArea.d.ts +6 -0
- package/pkg/models/LexError.d.ts +6 -0
- package/pkg/models/LockHolder.d.ts +3 -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/OutboxProblem.d.ts +3 -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/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/PlanView.d.ts +9 -0
- package/pkg/models/PlanWarning.d.ts +3 -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/RetainedPlanProvenance.d.ts +11 -0
- package/pkg/models/Scenario.d.ts +11 -0
- package/pkg/models/ScenarioKind.d.ts +3 -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/StatementOrigin.d.ts +6 -0
- package/pkg/models/StatementProblem.d.ts +4 -0
- package/pkg/models/StatisticsInfo.d.ts +3 -0
- package/pkg/models/TriggerTiming.d.ts +3 -0
- package/pkg/models/Unit.d.ts +3 -0
- package/pkg/models/WorkerSkew.d.ts +3 -0
- package/pkg/native/culprit_wasm.d.ts +49 -0
- package/pkg/native/culprit_wasm.js +378 -0
- package/pkg/native/culprit_wasm_bg.wasm +0 -0
- package/pkg/native/culprit_wasm_bg.wasm.d.ts +11 -0
|
@@ -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,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,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 { RelationalInputKind } from "./RelationalInputKind.js";
|
|
3
|
+
import type { RelationalInputProvenance } from "./RelationalInputProvenance.js";
|
|
4
|
+
|
|
5
|
+
export type RelationalInput = { kind: RelationalInputKind, provenance: RelationalInputProvenance, };
|
|
@@ -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 { CachedStatementContext } from "./CachedStatementContext.js";
|
|
3
|
+
import type { NativePlanIdentity } from "./NativePlanIdentity.js";
|
|
4
|
+
import type { NativeQueryIdentity } from "./NativeQueryIdentity.js";
|
|
5
|
+
import type { NativeReadContext } from "./NativeReadContext.js";
|
|
6
|
+
|
|
7
|
+
export type RetainedPlanProvenance = { read: NativeReadContext, statement: CachedStatementContext,
|
|
8
|
+
/**
|
|
9
|
+
* A source-established CURRENT statement relation; it does not transfer historical runtime or schema facts.
|
|
10
|
+
*/
|
|
11
|
+
query: NativeQueryIdentity | null, native_plan: NativePlanIdentity | null, };
|
|
@@ -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 { ScenarioKind } from "./ScenarioKind.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One condition that differs between the plans, with what it does to the plan.
|
|
6
|
+
*/
|
|
7
|
+
export type Scenario = { kind: ScenarioKind, title: string, detail: string | null,
|
|
8
|
+
/**
|
|
9
|
+
* Node in plan A this is about, when it is about one.
|
|
10
|
+
*/
|
|
11
|
+
a: number | null, b: number | null, };
|
|
@@ -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 { Engine } from "./Engine.js";
|
|
3
|
+
import type { NativeIdentity } from "./NativeIdentity.js";
|
|
4
|
+
import type { SharedResourceKind } from "./SharedResourceKind.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The adapter supplies both the resource's native identity and its namespace. A pool name, node number,
|
|
8
|
+
* or process-local identifier alone cannot establish identity across unrelated servers or clusters.
|
|
9
|
+
* Resource incarnation belongs here; counter resets and process/session lifetimes remain measurement evidence.
|
|
10
|
+
*/
|
|
11
|
+
export type SharedResourceIdentity = { engine: Engine, kind: SharedResourceKind, namespace: NativeIdentity, native: NativeIdentity, };
|
|
@@ -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 { SharedResourceIdentity } from "./SharedResourceIdentity.js";
|
|
3
|
+
|
|
4
|
+
export type SourcePartition = { "kind": "target" } | { "kind": "instance-local", member: SharedResourceIdentity | null,
|
|
5
|
+
/**
|
|
6
|
+
* A source-owned native generation, separate from replica role and collector ownership epochs.
|
|
7
|
+
*/
|
|
8
|
+
epoch: string | null, };
|
|
@@ -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
|
+
* Native provenance is a fact, independent of redacted text and analytical workload selection.
|
|
5
|
+
*/
|
|
6
|
+
export type StatementOrigin = "application" | "culprit-monitoring" | "culprit" | "engine-internal" | "unknown";
|
|
@@ -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 StatisticsInfo = { schema: string, table: string, name: string, last_updated: string | null, rows: number | null, rows_sampled: number | null, modifications: number | null, auto_created: boolean, };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export function diffPlansJson(a_json: string, name_a: string, b_json: string, name_b: string, context_json: string): string;
|
|
5
|
+
|
|
6
|
+
export function exportPlanJson(plan_json: string, title: string, format_json: string, options_json: string, exported_at: string): string;
|
|
7
|
+
|
|
8
|
+
export function parseDeadlockJson(input: string): string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The optional supplied engine selects the existing strict native parser; it is not source authority.
|
|
12
|
+
*/
|
|
13
|
+
export function parsePlanJson(input: string, engine_json: string): string;
|
|
14
|
+
|
|
15
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
16
|
+
|
|
17
|
+
export interface InitOutput {
|
|
18
|
+
readonly memory: WebAssembly.Memory;
|
|
19
|
+
readonly diffPlansJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
20
|
+
readonly exportPlanJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
21
|
+
readonly parseDeadlockJson: (a: number, b: number, c: number) => void;
|
|
22
|
+
readonly parsePlanJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
23
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
24
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
25
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
26
|
+
readonly __wbindgen_export3: (a: number, b: number, c: number) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
33
|
+
* a precompiled `WebAssembly.Module`.
|
|
34
|
+
*
|
|
35
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
36
|
+
*
|
|
37
|
+
* @returns {InitOutput}
|
|
38
|
+
*/
|
|
39
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
43
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
44
|
+
*
|
|
45
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
46
|
+
*
|
|
47
|
+
* @returns {Promise<InitOutput>}
|
|
48
|
+
*/
|
|
49
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|