From d081e5ada2bf1c27c2645b1479536d7ce7628c81 Mon Sep 17 00:00:00 2001 From: Eric Harmeling Date: Wed, 15 Mar 2023 17:23:54 +0000 Subject: [PATCH] sql: added indexes to system.statement_statistics, system.transaction_statistics Fixes #98624. This commit adds indexes on new computed columns to the system.statement_statistics and system.transaction_statistics tables. Epic: none Release note: None --- .../settings/settings-for-tenants.txt | 2 +- docs/generated/settings/settings.html | 2 +- pkg/cli/testdata/declarative-rules/deprules | 2 +- pkg/cli/testdata/declarative-rules/oprules | 2 +- pkg/clusterversion/cockroach_versions.go | 10 + pkg/sql/catalog/bootstrap/testdata/testdata | 12 +- pkg/sql/catalog/systemschema/system.go | 264 ++++++++++++++++- .../systemschema_test/testdata/bootstrap | 32 +- .../testdata/logic_test/crdb_internal_catalog | 4 +- .../testdata/logic_test/information_schema | 10 + .../logictest/testdata/logic_test/pg_catalog | 40 +++ .../sqlstats/persistedsqlstats/BUILD.bazel | 1 + .../sqlstats/persistedsqlstats/bench_test.go | 251 ++++++++++++++++ pkg/upgrade/upgrades/BUILD.bazel | 2 + .../create_computed_indexes_sql_statistics.go | 273 ++++++++++++++++++ ...te_computed_indexes_sql_statistics_test.go | 99 +++++++ pkg/upgrade/upgrades/upgrades.go | 6 + 17 files changed, 987 insertions(+), 25 deletions(-) create mode 100644 pkg/upgrade/upgrades/create_computed_indexes_sql_statistics.go create mode 100644 pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go diff --git a/docs/generated/settings/settings-for-tenants.txt b/docs/generated/settings/settings-for-tenants.txt index 37dfcd072d7f..e1a3f63438a8 100644 --- a/docs/generated/settings/settings-for-tenants.txt +++ b/docs/generated/settings/settings-for-tenants.txt @@ -299,4 +299,4 @@ trace.opentelemetry.collector string address of an OpenTelemetry trace collecto trace.snapshot.rate duration 0s if non-zero, interval at which background trace snapshots are captured trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collector string the address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -version version 1000022.2-90 set the active cluster version in the format '.' +version version 1000022.2-92 set the active cluster version in the format '.' diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index cee8b19fe8b1..e526a8db6d95 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -240,6 +240,6 @@
trace.snapshot.rate
duration0sif non-zero, interval at which background trace snapshots are captured
trace.span_registry.enabled
booleantrueif set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector
stringthe address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used. -
version
version1000022.2-90set the active cluster version in the format '<major>.<minor>' +
version
version1000022.2-92set the active cluster version in the format '<major>.<minor>' diff --git a/pkg/cli/testdata/declarative-rules/deprules b/pkg/cli/testdata/declarative-rules/deprules index 30ea992a37c9..ddba96b9f4ba 100644 --- a/pkg/cli/testdata/declarative-rules/deprules +++ b/pkg/cli/testdata/declarative-rules/deprules @@ -1,6 +1,6 @@ dep ---- -debug declarative-print-rules 1000022.2-90 dep +debug declarative-print-rules 1000022.2-92 dep deprules ---- - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' diff --git a/pkg/cli/testdata/declarative-rules/oprules b/pkg/cli/testdata/declarative-rules/oprules index f947541bd949..b17895b375d9 100644 --- a/pkg/cli/testdata/declarative-rules/oprules +++ b/pkg/cli/testdata/declarative-rules/oprules @@ -1,6 +1,6 @@ op ---- -debug declarative-print-rules 1000022.2-90 op +debug declarative-print-rules 1000022.2-92 op rules ---- [] diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 4ece0b7fbf84..ab20f8685f43 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -498,6 +498,12 @@ const ( // config runner persistent job has been created. V23_1_CreateAutoConfigRunnerJob + // V23_1AddSQLStatsComputedIndexes is the version at which Cockroach adds new + // computed columns and indexes to the statement_statistics and + // transaction_statistics system tables. These columns optimize persisted SQL + // statistics queries for observability. + V23_1AddSQLStatsComputedIndexes + // ************************************************* // Step (1): Add new versions here. // Do not add new versions to a patch release. @@ -863,6 +869,10 @@ var rawVersionsSingleton = keyedVersions{ Key: V23_1_CreateAutoConfigRunnerJob, Version: roachpb.Version{Major: 22, Minor: 2, Internal: 90}, }, + { + Key: V23_1AddSQLStatsComputedIndexes, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 92}, + }, // ************************************************* // Step (2): Add new versions here. diff --git a/pkg/sql/catalog/bootstrap/testdata/testdata b/pkg/sql/catalog/bootstrap/testdata/testdata index 2fec31830476..6a8311e29db9 100644 --- a/pkg/sql/catalog/bootstrap/testdata/testdata +++ b/pkg/sql/catalog/bootstrap/testdata/testdata @@ -1,4 +1,4 @@ -system hash=642eab4285dee14681ca9c25174565ea8b11a2240c7c63de434a57ce06fece73 +system hash=5562425ae16109830d51753fe0cea2d6f92f2e789233ad8ab7dcf1e39a3c04a4 ---- [{"key":"04646573632d696467656e","value":"01c801"} ,{"key":"8b"} @@ -34,8 +34,8 @@ system hash=642eab4285dee14681ca9c25174565ea8b11a2240c7c63de434a57ce06fece73 ,{"key":"8b89af8a89","value":"030ad3030a0b73716c6c6976656e6573731827200128013a00422f0a0a73657373696f6e5f696410011a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10021a0d080310001800300050a40d60002000300068007000780080010088010098010042300a0b637264625f726567696f6e10031a0c0808100018003000501160002000300068007000780080010088010098010048045280010a077072696d61727910021801220b637264625f726567696f6e220a73657373696f6e5f69642a0a65787069726174696f6e30033001400040004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201380a077072696d61727910001a0b637264625f726567696f6e1a0a73657373696f6e5f69641a0a65787069726174696f6e2003200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b08a89","value":"030ac0040a0a6d6967726174696f6e731828200128013a00422a0a056d616a6f7210011a0c08011040180030005014600020003000680070007800800100880100980100422a0a056d696e6f7210021a0c08011040180030005014600020003000680070007800800100880100980100422a0a05706174636810031a0c08011040180030005014600020003000680070007800800100880100980100422d0a08696e7465726e616c10041a0c0801104018003000501460002000300068007000780080010088010098010042320a0c636f6d706c657465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010048065290010a077072696d6172791001180122056d616a6f7222056d696e6f72220570617463682208696e7465726e616c2a0c636f6d706c657465645f6174300130023003300440004000400040004a10080010001a00200028003000380040005a0070057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201440a077072696d61727910001a056d616a6f721a056d696e6f721a0570617463681a08696e7465726e616c1a0c636f6d706c657465645f6174200120022003200420052805b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b18a89","value":"030aaa030a0b6a6f696e5f746f6b656e731829200128013a0042280a02696410011a0d080e100018003000508617600020003000680070007800800100880100980100422b0a0673656372657410021a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10031a0d080910001800300050a009600020003000680070007800800100880100980100480452710a077072696d61727910011801220269642a067365637265742a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012b0a077072696d61727910001a0269641a067365637265741a0a65787069726174696f6e2001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b28a89","value":"030abe140a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100426c0a0d696e64657865735f7573616765100d1a0d081210001800300050da1d6000200130005a3728737461746973746963732d3e2773746174697374696373273a3a3a535452494e47292d3e27696e6465786573273a3a3a535452494e47680070007800800101880100980100480e52bd040a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e73300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c7a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a7f0a11696e64657865735f75736167655f69647810031800220d696e64657865735f7573616765300d380b38013802380338043805380640004a10080010001a00200028003000380040005a007a0408002000800101880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100d80100e0010060046a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b201a9020a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e73200b200120022003200420052006200720082009200a200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b38a89","value":"030ae60c0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e543829680070007800800100880100980100480952fb020a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a7374617469737469637330083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201b8010a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a73746174697374696373200820012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} +,{"key":"8b89b28a89","value":"030aea220a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100426c0a0d696e64657865735f7573616765100d1a0d081210001800300050da1d6000200130005a3728737461746973746963732d3e2773746174697374696373273a3a3a535452494e47292d3e27696e6465786573273a3a3a535452494e4768007000780080010188010098010042670a0f657865637574696f6e5f636f756e74100e1a0c080110401800300050146000200130005a3128737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636e7427293a3a494e5438680070007800800100880100980100426a0a0f736572766963655f6c6174656e6379100f1a0d080210401800300050bd056000200130005a3328737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042770a0d6370755f73716c5f6e616e6f7310101a0d080210401800300050bd056000200130005a4228737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e2763707553514c4e616e6f73272d3e276d65616e27293a3a464c4f4154680070007800800100880100980100427c0a0f636f6e74656e74696f6e5f74696d6510111a0d080210401800300050bd056000200130005a4528737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636f6e74656e74696f6e54696d65272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042b0010a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6510121a0d080210401800300050bd056000200130005a6a28737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e3e27636e7427293a3a666c6f6174202a2028737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e3e276d65616e27293a3a464c4f4154680070007800800100880100980100481352a9050a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e732a0f657865637574696f6e5f636f756e742a0f736572766963655f6c6174656e63792a0d6370755f73716c5f6e616e6f732a0f636f6e74656e74696f6e5f74696d652a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c700e700f7010701170127a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a7f0a11696e64657865735f75736167655f69647810031800220d696e64657865735f7573616765300d380b38013802380338043805380640004a10080010001a00200028003000380040005a007a0408002000800101880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100d80100e001005abc010a13657865637574696f6e5f636f756e745f69647810041800220d616767726567617465645f747322086170705f6e616d65220f657865637574696f6e5f636f756e7430013005300e380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005abc010a13736572766963655f6c6174656e63795f69647810051800220d616767726567617465645f747322086170705f6e616d65220f736572766963655f6c6174656e637930013005300f380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ab8010a116370755f73716c5f6e616e6f735f69647810061800220d616767726567617465645f747322086170705f6e616d65220d6370755f73716c5f6e616e6f73300130053010380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005abc010a13636f6e74656e74696f6e5f74696d655f69647810071800220d616767726567617465645f747322086170705f6e616d65220f636f6e74656e74696f6e5f74696d65300130053011380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ada010a22746f74616c5f657374696d617465645f657865637574696f6e5f74696d655f69647810081800220d616767726567617465645f747322086170705f6e616d65221e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65300130053012380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e0010060096a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b20195030a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e731a0f657865637574696f6e5f636f756e741a0f736572766963655f6c6174656e63791a0d6370755f73716c5f6e616e6f731a0f636f6e74656e74696f6e5f74696d651a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65200b200120022003200420052006200720082009200a200c200e200f2010201120122800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} +,{"key":"8b89b38a89","value":"030a881b0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e54382968007000780080010088010098010042670a0f657865637574696f6e5f636f756e7410091a0c080110401800300050146000200130005a3128737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636e7427293a3a494e5438680070007800800100880100980100426a0a0f736572766963655f6c6174656e6379100a1a0d080210401800300050bd056000200130005a3328737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042770a0d6370755f73716c5f6e616e6f73100b1a0d080210401800300050bd056000200130005a4228737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e2763707553514c4e616e6f73272d3e276d65616e27293a3a464c4f4154680070007800800100880100980100427c0a0f636f6e74656e74696f6e5f74696d65100c1a0d080210401800300050bd056000200130005a4528737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636f6e74656e74696f6e54696d65272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042b0010a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65100d1a0d080210401800300050bd056000200130005a6a28737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e3e27636e7427293a3a666c6f6174202a2028737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e3e276d65616e27293a3a464c4f4154680070007800800100880100980100480e52e7030a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a0f657865637574696f6e5f636f756e742a0f736572766963655f6c6174656e63792a0d6370755f73716c5f6e616e6f732a0f636f6e74656e74696f6e5f74696d652a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6530083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077009700a700b700c700d7a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aba010a13657865637574696f6e5f636f756e745f69647810031800220d616767726567617465645f747322086170705f6e616d65220f657865637574696f6e5f636f756e7430013003300938083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005aba010a13736572766963655f6c6174656e63795f69647810041800220d616767726567617465645f747322086170705f6e616d65220f736572766963655f6c6174656e637930013003300a38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ab6010a116370755f73716c5f6e616e6f735f69647810051800220d616767726567617465645f747322086170705f6e616d65220d6370755f73716c5f6e616e6f7330013003300b38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005aba010a13636f6e74656e74696f6e5f74696d655f69647810061800220d616767726567617465645f747322086170705f6e616d65220f636f6e74656e74696f6e5f74696d6530013003300c38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ad8010a22746f74616c5f657374696d617465645f657865637574696f6e5f74696d655f69647810071800220d616767726567617465645f747322086170705f6e616d65221e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6530013003300d38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e0010060086a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201a4020a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a0f657865637574696f6e5f636f756e741a0f736572766963655f6c6174656e63791a0d6370755f73716c5f6e616e6f731a0f636f6e74656e74696f6e5f74696d651a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65200820012002200320042005200620072009200a200b200c200d2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} ,{"key":"8b89b48a89","value":"030ad0050a1664617461626173655f726f6c655f73657474696e6773182c200128013a0042300a0b64617461626173655f696410011a0c080c100018003000501a600020003000680070007800800100880100980100422e0a09726f6c655f6e616d6510021a0c08071000180030005019600020003000680070007800800100880100980100423e0a0873657474696e677310031a1d080f100018003000380750f1075a0c080710001800300050196000600020003000680070007800800100880100980100422c0a07726f6c655f696410041a0c080c100018003000501a60002001300068007000780080010088010098010048055288010a077072696d61727910011801220b64617461626173655f69642209726f6c655f6e616d652a0873657474696e67732a07726f6c655f696430013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e001005aa4010a2e64617461626173655f726f6c655f73657474696e67735f64617461626173655f69645f726f6c655f69645f6b657910021801220b64617461626173655f69642207726f6c655f69642a0873657474696e6773300130043802400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201400a077072696d61727910001a0b64617461626173655f69641a09726f6c655f6e616d651a0873657474696e67731a07726f6c655f696420012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} ,{"key":"8b89b58a89","value":"030a840a0a0c74656e616e745f7573616765182d200128013a00422e0a0974656e616e745f696410011a0c0801104018003000501460002000300068007000780080010088010098010042300a0b696e7374616e63655f696410021a0c0801104018003000501460002000300068007000780080010088010098010042350a106e6578745f696e7374616e63655f696410031a0c0801104018003000501460002000300068007000780080010088010098010042310a0b6c6173745f75706461746510041a0d080510001800300050da0860002000300068007000780080010088010098010042340a0e72755f62757273745f6c696d697410051a0d080210401800300050bd0560002001300068007000780080010088010098010042340a0e72755f726566696c6c5f7261746510061a0d080210401800300050bd0560002001300068007000780080010088010098010042300a0a72755f63757272656e7410071a0d080210401800300050bd0560002001300068007000780080010088010098010042370a1163757272656e745f73686172655f73756d10081a0d080210401800300050bd0560002001300068007000780080010088010098010042360a11746f74616c5f636f6e73756d7074696f6e10091a0c0808100018003000501160002001300068007000780080010088010098010042330a0e696e7374616e63655f6c65617365100a1a0c0808100018003000501160002001300068007000780080010088010098010042310a0c696e7374616e63655f736571100b1a0c0801104018003000501460002001300068007000780080010088010098010042350a0f696e7374616e63655f736861726573100c1a0d080210401800300050bd05600020013000680070007800800100880100980100480d52a5020a077072696d61727910011801220974656e616e745f6964220b696e7374616e63655f69642a106e6578745f696e7374616e63655f69642a0b6c6173745f7570646174652a0e72755f62757273745f6c696d69742a0e72755f726566696c6c5f726174652a0a72755f63757272656e742a1163757272656e745f73686172655f73756d2a11746f74616c5f636f6e73756d7074696f6e2a0e696e7374616e63655f6c656173652a0c696e7374616e63655f7365712a0f696e7374616e63655f73686172657330013002400040004a10080010001a00200028003000380040005a007003700470057006700770087009700a700b700c7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201dd010a077072696d61727910001a0974656e616e745f69641a0b696e7374616e63655f69641a106e6578745f696e7374616e63655f69641a0b6c6173745f7570646174651a0e72755f62757273745f6c696d69741a0e72755f726566696c6c5f726174651a0a72755f63757272656e741a1163757272656e745f73686172655f73756d1a11746f74616c5f636f6e73756d7074696f6e1a0e696e7374616e63655f6c656173651a0c696e7374616e63655f7365711a0f696e7374616e63655f736861726573200120022003200420052006200720082009200a200b200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b68a89","value":"030a86050a0d73716c5f696e7374616e636573182e200128013a0042270a02696410011a0c0801104018003000501460002000300068007000780080010088010098010042290a046164647210021a0c08071000180030005019600020013000680070007800800100880100980100422f0a0a73657373696f6e5f696410031a0c08081000180030005011600020013000680070007800800100880100980100422e0a086c6f63616c69747910041a0d081210001800300050da1d600020013000680070007800800100880100980100422d0a0873716c5f6164647210051a0c0807100018003000501960002001300068007000780080010088010098010042300a0b637264625f726567696f6e10061a0c0808100018003000501160002000300068007000780080010088010098010048075298010a077072696d61727910021801220b637264625f726567696f6e220269642a04616464722a0a73657373696f6e5f69642a086c6f63616c6974792a0873716c5f6164647230063001400040004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201500a077072696d61727910001a0269641a04616464721a0a73657373696f6e5f69641a086c6f63616c6974791a0873716c5f616464721a0b637264625f726567696f6e2001200220032004200520062800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} @@ -169,7 +169,7 @@ system hash=642eab4285dee14681ca9c25174565ea8b11a2240c7c63de434a57ce06fece73 ,{"key":"c3"} ] -tenant hash=0d0d1ed914ac7eecb9900382aa7a9cca5b2806b3fcf3f6e9b1d499c717d99738 +tenant hash=c1cd91eacc55288dffeccd575e5077217022e7397bf03a66031be7c42f32546f ---- [{"key":""} ,{"key":"8b89898a89","value":"0312390a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518022200280140004a00"} @@ -203,8 +203,8 @@ tenant hash=0d0d1ed914ac7eecb9900382aa7a9cca5b2806b3fcf3f6e9b1d499c717d99738 ,{"key":"8b89af8a89","value":"030ad3030a0b73716c6c6976656e6573731827200128013a00422f0a0a73657373696f6e5f696410011a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10021a0d080310001800300050a40d60002000300068007000780080010088010098010042300a0b637264625f726567696f6e10031a0c0808100018003000501160002000300068007000780080010088010098010048045280010a077072696d61727910021801220b637264625f726567696f6e220a73657373696f6e5f69642a0a65787069726174696f6e30033001400040004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201380a077072696d61727910001a0b637264625f726567696f6e1a0a73657373696f6e5f69641a0a65787069726174696f6e2003200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b08a89","value":"030ac0040a0a6d6967726174696f6e731828200128013a00422a0a056d616a6f7210011a0c08011040180030005014600020003000680070007800800100880100980100422a0a056d696e6f7210021a0c08011040180030005014600020003000680070007800800100880100980100422a0a05706174636810031a0c08011040180030005014600020003000680070007800800100880100980100422d0a08696e7465726e616c10041a0c0801104018003000501460002000300068007000780080010088010098010042320a0c636f6d706c657465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010048065290010a077072696d6172791001180122056d616a6f7222056d696e6f72220570617463682208696e7465726e616c2a0c636f6d706c657465645f6174300130023003300440004000400040004a10080010001a00200028003000380040005a0070057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201440a077072696d61727910001a056d616a6f721a056d696e6f721a0570617463681a08696e7465726e616c1a0c636f6d706c657465645f6174200120022003200420052805b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b18a89","value":"030aaa030a0b6a6f696e5f746f6b656e731829200128013a0042280a02696410011a0d080e100018003000508617600020003000680070007800800100880100980100422b0a0673656372657410021a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10031a0d080910001800300050a009600020003000680070007800800100880100980100480452710a077072696d61727910011801220269642a067365637265742a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012b0a077072696d61727910001a0269641a067365637265741a0a65787069726174696f6e2001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b28a89","value":"030abe140a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100426c0a0d696e64657865735f7573616765100d1a0d081210001800300050da1d6000200130005a3728737461746973746963732d3e2773746174697374696373273a3a3a535452494e47292d3e27696e6465786573273a3a3a535452494e47680070007800800101880100980100480e52bd040a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e73300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c7a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a7f0a11696e64657865735f75736167655f69647810031800220d696e64657865735f7573616765300d380b38013802380338043805380640004a10080010001a00200028003000380040005a007a0408002000800101880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100d80100e0010060046a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b201a9020a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e73200b200120022003200420052006200720082009200a200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b38a89","value":"030ae60c0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e543829680070007800800100880100980100480952fb020a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a7374617469737469637330083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201b8010a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a73746174697374696373200820012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} +,{"key":"8b89b28a89","value":"030aea220a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100426c0a0d696e64657865735f7573616765100d1a0d081210001800300050da1d6000200130005a3728737461746973746963732d3e2773746174697374696373273a3a3a535452494e47292d3e27696e6465786573273a3a3a535452494e4768007000780080010188010098010042670a0f657865637574696f6e5f636f756e74100e1a0c080110401800300050146000200130005a3128737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636e7427293a3a494e5438680070007800800100880100980100426a0a0f736572766963655f6c6174656e6379100f1a0d080210401800300050bd056000200130005a3328737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042770a0d6370755f73716c5f6e616e6f7310101a0d080210401800300050bd056000200130005a4228737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e2763707553514c4e616e6f73272d3e276d65616e27293a3a464c4f4154680070007800800100880100980100427c0a0f636f6e74656e74696f6e5f74696d6510111a0d080210401800300050bd056000200130005a4528737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636f6e74656e74696f6e54696d65272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042b0010a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6510121a0d080210401800300050bd056000200130005a6a28737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e3e27636e7427293a3a666c6f6174202a2028737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e3e276d65616e27293a3a464c4f4154680070007800800100880100980100481352a9050a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e732a0f657865637574696f6e5f636f756e742a0f736572766963655f6c6174656e63792a0d6370755f73716c5f6e616e6f732a0f636f6e74656e74696f6e5f74696d652a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c700e700f7010701170127a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a7f0a11696e64657865735f75736167655f69647810031800220d696e64657865735f7573616765300d380b38013802380338043805380640004a10080010001a00200028003000380040005a007a0408002000800101880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100d80100e001005abc010a13657865637574696f6e5f636f756e745f69647810041800220d616767726567617465645f747322086170705f6e616d65220f657865637574696f6e5f636f756e7430013005300e380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005abc010a13736572766963655f6c6174656e63795f69647810051800220d616767726567617465645f747322086170705f6e616d65220f736572766963655f6c6174656e637930013005300f380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ab8010a116370755f73716c5f6e616e6f735f69647810061800220d616767726567617465645f747322086170705f6e616d65220d6370755f73716c5f6e616e6f73300130053010380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005abc010a13636f6e74656e74696f6e5f74696d655f69647810071800220d616767726567617465645f747322086170705f6e616d65220f636f6e74656e74696f6e5f74696d65300130053011380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ada010a22746f74616c5f657374696d617465645f657865637574696f6e5f74696d655f69647810081800220d616767726567617465645f747322086170705f6e616d65221e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65300130053012380b38023803380438064000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e0010060096a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b20195030a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e731a0f657865637574696f6e5f636f756e741a0f736572766963655f6c6174656e63791a0d6370755f73716c5f6e616e6f731a0f636f6e74656e74696f6e5f74696d651a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65200b200120022003200420052006200720082009200a200c200e200f2010201120122800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} +,{"key":"8b89b38a89","value":"030a881b0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e54382968007000780080010088010098010042670a0f657865637574696f6e5f636f756e7410091a0c080110401800300050146000200130005a3128737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636e7427293a3a494e5438680070007800800100880100980100426a0a0f736572766963655f6c6174656e6379100a1a0d080210401800300050bd056000200130005a3328737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042770a0d6370755f73716c5f6e616e6f73100b1a0d080210401800300050bd056000200130005a4228737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e2763707553514c4e616e6f73272d3e276d65616e27293a3a464c4f4154680070007800800100880100980100427c0a0f636f6e74656e74696f6e5f74696d65100c1a0d080210401800300050bd056000200130005a4528737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e27636f6e74656e74696f6e54696d65272d3e276d65616e27293a3a464c4f415468007000780080010088010098010042b0010a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65100d1a0d080210401800300050bd056000200130005a6a28737461746973746963732d3e27657865637574696f6e5f73746174697374696373272d3e3e27636e7427293a3a666c6f6174202a2028737461746973746963732d3e2773746174697374696373272d3e277376634c6174272d3e3e276d65616e27293a3a464c4f4154680070007800800100880100980100480e52e7030a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a0f657865637574696f6e5f636f756e742a0f736572766963655f6c6174656e63792a0d6370755f73716c5f6e616e6f732a0f636f6e74656e74696f6e5f74696d652a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6530083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077009700a700b700c700d7a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aba010a13657865637574696f6e5f636f756e745f69647810031800220d616767726567617465645f747322086170705f6e616d65220f657865637574696f6e5f636f756e7430013003300938083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005aba010a13736572766963655f6c6174656e63795f69647810041800220d616767726567617465645f747322086170705f6e616d65220f736572766963655f6c6174656e637930013003300a38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ab6010a116370755f73716c5f6e616e6f735f69647810051800220d616767726567617465645f747322086170705f6e616d65220d6370755f73716c5f6e616e6f7330013003300b38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005aba010a13636f6e74656e74696f6e5f74696d655f69647810061800220d616767726567617465645f747322086170705f6e616d65220f636f6e74656e74696f6e5f74696d6530013003300c38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e001005ad8010a22746f74616c5f657374696d617465645f657865637574696f6e5f74696d655f69647810071800220d616767726567617465645f747322086170705f6e616d65221e746f74616c5f657374696d617465645f657865637574696f6e5f74696d6530013003300d38083802380438054000400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba011f6170705f6e616d65204e4f54204c494b4520272420696e7465726e616c2527c00100c80100d00100e0010060086a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201a4020a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a0f657865637574696f6e5f636f756e741a0f736572766963655f6c6174656e63791a0d6370755f73716c5f6e616e6f731a0f636f6e74656e74696f6e5f74696d651a1e746f74616c5f657374696d617465645f657865637574696f6e5f74696d65200820012002200320042005200620072009200a200b200c200d2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} ,{"key":"8b89b48a89","value":"030ad0050a1664617461626173655f726f6c655f73657474696e6773182c200128013a0042300a0b64617461626173655f696410011a0c080c100018003000501a600020003000680070007800800100880100980100422e0a09726f6c655f6e616d6510021a0c08071000180030005019600020003000680070007800800100880100980100423e0a0873657474696e677310031a1d080f100018003000380750f1075a0c080710001800300050196000600020003000680070007800800100880100980100422c0a07726f6c655f696410041a0c080c100018003000501a60002001300068007000780080010088010098010048055288010a077072696d61727910011801220b64617461626173655f69642209726f6c655f6e616d652a0873657474696e67732a07726f6c655f696430013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e001005aa4010a2e64617461626173655f726f6c655f73657474696e67735f64617461626173655f69645f726f6c655f69645f6b657910021801220b64617461626173655f69642207726f6c655f69642a0873657474696e6773300130043802400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201400a077072696d61727910001a0b64617461626173655f69641a09726f6c655f6e616d651a0873657474696e67731a07726f6c655f696420012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} ,{"key":"8b89b68a89","value":"030a86050a0d73716c5f696e7374616e636573182e200128013a0042270a02696410011a0c0801104018003000501460002000300068007000780080010088010098010042290a046164647210021a0c08071000180030005019600020013000680070007800800100880100980100422f0a0a73657373696f6e5f696410031a0c08081000180030005011600020013000680070007800800100880100980100422e0a086c6f63616c69747910041a0d081210001800300050da1d600020013000680070007800800100880100980100422d0a0873716c5f6164647210051a0c0807100018003000501960002001300068007000780080010088010098010042300a0b637264625f726567696f6e10061a0c0808100018003000501160002000300068007000780080010088010098010048075298010a077072696d61727910021801220b637264625f726567696f6e220269642a04616464722a0a73657373696f6e5f69642a086c6f63616c6974792a0873716c5f6164647230063001400040004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201500a077072696d61727910001a0269641a04616464721a0a73657373696f6e5f69641a086c6f63616c6974791a0873716c5f616464721a0b637264625f726567696f6e2001200220032004200520062800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89b88a89","value":"030abe020a0b726f6c655f69645f7365711830200128013a00422a0a0576616c756510011a0c080110401800300050146000200030006800700078008001008801009801004800525c0a077072696d61727910011800220576616c7565300140004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060006a250a0d0a0561646d696e10a00618a0060a0c0a04726f6f7410a00618a00612046e6f64651802800100880103980100b201160a077072696d61727910001a0576616c756520012801b80100c20100e201180801106418ffffffff072064280032040800100038014200e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880300a80300b00300"} diff --git a/pkg/sql/catalog/systemschema/system.go b/pkg/sql/catalog/systemschema/system.go index 72afffa5bea2..67780b95575b 100644 --- a/pkg/sql/catalog/systemschema/system.go +++ b/pkg/sql/catalog/systemschema/system.go @@ -120,10 +120,20 @@ CREATE TABLE system.tenants ( RoleIDSequenceSchema = ` CREATE SEQUENCE system.role_id_seq START 100 MINVALUE 100 MAXVALUE 2147483647;` - indexUsageComputeExpr = `(statistics->'statistics':::STRING)->'indexes':::STRING` + indexUsageComputeExpr = `(statistics->'statistics':::STRING)->'indexes':::STRING` + executionCountComputeExpr = `((statistics->'execution_statistics':::STRING)->'cnt':::STRING)::INT8` + serviceLatencyComputeExpr = `(((statistics->'statistics':::STRING)->'svcLat':::STRING)->'mean':::STRING)::FLOAT8` + cpuSqlNanosComputeExpr = `(((statistics->'execution_statistics':::STRING)->'cpuSQLNanos':::STRING)->'mean':::STRING)::FLOAT8` + contentionTimeComputeExpr = `(((statistics->'execution_statistics':::STRING)->'contentionTime':::STRING)->'mean':::STRING)::FLOAT8` + totalEstimatedExecutionTimeExpr = `((statistics->'execution_statistics':::STRING)->>'cnt':::STRING)::FLOAT8 * (((statistics->'statistics':::STRING)->'svcLat':::STRING)->>'mean':::STRING)::FLOAT8` ) var indexUsageComputeExprStr = indexUsageComputeExpr +var executionCountComputeExprStr = executionCountComputeExpr +var serviceLatencyComputeExprStr = serviceLatencyComputeExpr +var cpuSqlNanosComputeExprStr = cpuSqlNanosComputeExpr +var contentionTimeComputeExprStr = contentionTimeComputeExpr +var totalEstimatedExecutionTimeExprStr = totalEstimatedExecutionTimeExpr // These system tables are not part of the system config. const ( @@ -528,11 +538,21 @@ CREATE TABLE system.statement_statistics ( index_recommendations STRING[] NOT NULL DEFAULT (array[]::STRING[]), indexes_usage JSONB AS (` + indexUsageComputeExpr + `) VIRTUAL, + execution_count INT8 AS (` + executionCountComputeExpr + `) STORED, + service_latency FLOAT AS (` + serviceLatencyComputeExpr + `) STORED, + cpu_sql_nanos FLOAT AS (` + cpuSqlNanosComputeExpr + `) STORED, + contention_time FLOAT AS (` + contentionTimeComputeExpr + `) STORED, + total_estimated_execution_time FLOAT AS (` + totalEstimatedExecutionTimeExpr + `) STORED, CONSTRAINT "primary" PRIMARY KEY (aggregated_ts, fingerprint_id, transaction_fingerprint_id, plan_hash, app_name, node_id) USING HASH WITH (bucket_count=8), INDEX "fingerprint_stats_idx" (fingerprint_id, transaction_fingerprint_id), INVERTED INDEX "indexes_usage_idx" (indexes_usage), + INDEX "execution_count_idx" (aggregated_ts, app_name, execution_count DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "service_latency_idx" (aggregated_ts, app_name, service_latency DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "cpu_sql_nanos_idx" (aggregated_ts, app_name, cpu_sql_nanos DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "contention_time_idx" (aggregated_ts, app_name, contention_time DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "total_estimated_execution_time_idx" (aggregated_ts, app_name, total_estimated_execution_time DESC) WHERE app_name NOT LIKE '$ internal%', FAMILY "primary" ( crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8, aggregated_ts, @@ -545,7 +565,12 @@ CREATE TABLE system.statement_statistics ( metadata, statistics, plan, - index_recommendations + index_recommendations, + execution_count, + service_latency, + cpu_sql_nanos, + contention_time, + total_estimated_execution_time ) ) ` @@ -564,10 +589,20 @@ CREATE TABLE system.transaction_statistics ( crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 INT4 NOT VISIBLE NOT NULL AS ( mod(fnv32("crdb_internal.datums_to_bytes"(aggregated_ts, app_name, fingerprint_id, node_id)), 8:::INT8 )) STORED, + execution_count INT8 AS (` + executionCountComputeExpr + `) STORED, + service_latency FLOAT AS (` + serviceLatencyComputeExpr + `) STORED, + cpu_sql_nanos FLOAT AS (` + cpuSqlNanosComputeExpr + `) STORED, + contention_time FLOAT AS (` + contentionTimeComputeExpr + `) STORED, + total_estimated_execution_time FLOAT AS (` + totalEstimatedExecutionTimeExpr + `) STORED, CONSTRAINT "primary" PRIMARY KEY (aggregated_ts, fingerprint_id, app_name, node_id) USING HASH WITH (bucket_count=8), INDEX "fingerprint_stats_idx" (fingerprint_id), + INDEX "execution_count_idx" (aggregated_ts, app_name, execution_count DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "service_latency_idx" (aggregated_ts, app_name, service_latency DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "cpu_sql_nanos_idx" (aggregated_ts, app_name, cpu_sql_nanos DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "contention_time_idx" (aggregated_ts, app_name, contention_time DESC) WHERE app_name NOT LIKE '$ internal%', + INDEX "total_estimated_execution_time_idx" (aggregated_ts, app_name, total_estimated_execution_time DESC) WHERE app_name NOT LIKE '$ internal%', FAMILY "primary" ( crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8, aggregated_ts, @@ -576,7 +611,12 @@ CREATE TABLE system.transaction_statistics ( node_id, agg_interval, metadata, - statistics + statistics, + execution_count, + service_latency, + cpu_sql_nanos, + contention_time, + total_estimated_execution_time ) ); ` @@ -2438,6 +2478,11 @@ var ( }, {Name: "index_recommendations", ID: 12, Type: types.StringArray, Nullable: false, DefaultExpr: &defaultIndexRec}, {Name: "indexes_usage", ID: 13, Type: types.Jsonb, Nullable: true, Virtual: true, ComputeExpr: &indexUsageComputeExprStr}, + {Name: "execution_count", ID: 14, Type: types.Int, Nullable: true, ComputeExpr: &executionCountComputeExprStr}, + {Name: "service_latency", ID: 15, Type: types.Float, Nullable: true, ComputeExpr: &serviceLatencyComputeExprStr}, + {Name: "cpu_sql_nanos", ID: 16, Type: types.Float, Nullable: true, ComputeExpr: &cpuSqlNanosComputeExprStr}, + {Name: "contention_time", ID: 17, Type: types.Float, Nullable: true, ComputeExpr: &contentionTimeComputeExprStr}, + {Name: "total_estimated_execution_time", ID: 18, Type: types.Float, Nullable: true, ComputeExpr: &totalEstimatedExecutionTimeExprStr}, }, []descpb.ColumnFamilyDescriptor{ { @@ -2446,9 +2491,10 @@ var ( ColumnNames: []string{ "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "aggregated_ts", "fingerprint_id", "transaction_fingerprint_id", "plan_hash", "app_name", "node_id", - "agg_interval", "metadata", "statistics", "plan", "index_recommendations", + "agg_interval", "metadata", "statistics", "plan", "index_recommendations", "execution_count", + "service_latency", "cpu_sql_nanos", "contention_time", "total_estimated_execution_time", }, - ColumnIDs: []descpb.ColumnID{11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12}, + ColumnIDs: []descpb.ColumnID{11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18}, DefaultColumnID: 0, }, }, @@ -2522,6 +2568,105 @@ var ( Type: descpb.IndexDescriptor_INVERTED, InvertedColumnKinds: []catpb.InvertedIndexColumnKind{catpb.InvertedIndexColumnKind_DEFAULT}, }, + descpb.IndexDescriptor{ + Name: "execution_count_idx", + ID: 4, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "execution_count", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 5, 14}, + KeySuffixColumnIDs: []descpb.ColumnID{11, 2, 3, 4, 6}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "service_latency_idx", + ID: 5, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "service_latency", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 5, 15}, + KeySuffixColumnIDs: []descpb.ColumnID{11, 2, 3, 4, 6}, + CompositeColumnIDs: []descpb.ColumnID{15}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "cpu_sql_nanos_idx", + ID: 6, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "cpu_sql_nanos", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 5, 16}, + KeySuffixColumnIDs: []descpb.ColumnID{11, 2, 3, 4, 6}, + CompositeColumnIDs: []descpb.ColumnID{16}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "contention_time_idx", + ID: 7, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "contention_time", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 5, 17}, + KeySuffixColumnIDs: []descpb.ColumnID{11, 2, 3, 4, 6}, + CompositeColumnIDs: []descpb.ColumnID{17}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "total_estimated_execution_time_idx", + ID: 8, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "total_estimated_execution_time", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 5, 18}, + KeySuffixColumnIDs: []descpb.ColumnID{11, 2, 3, 4, 6}, + CompositeColumnIDs: []descpb.ColumnID{18}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, ), func(tbl *descpb.TableDescriptor) { tbl.Checks = []*descpb.TableDescriptor_CheckConstraint{{ @@ -2558,6 +2703,11 @@ var ( ComputeExpr: &sqlTxnHashComputeExpr, Hidden: true, }, + {Name: "execution_count", ID: 9, Type: types.Int, Nullable: true, ComputeExpr: &executionCountComputeExprStr}, + {Name: "service_latency", ID: 10, Type: types.Float, Nullable: true, ComputeExpr: &serviceLatencyComputeExprStr}, + {Name: "cpu_sql_nanos", ID: 11, Type: types.Float, Nullable: true, ComputeExpr: &cpuSqlNanosComputeExprStr}, + {Name: "contention_time", ID: 12, Type: types.Float, Nullable: true, ComputeExpr: &contentionTimeComputeExprStr}, + {Name: "total_estimated_execution_time", ID: 13, Type: types.Float, Nullable: true, ComputeExpr: &totalEstimatedExecutionTimeExprStr}, }, []descpb.ColumnFamilyDescriptor{ { @@ -2566,9 +2716,10 @@ var ( ColumnNames: []string{ "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "aggregated_ts", "fingerprint_id", "app_name", "node_id", - "agg_interval", "metadata", "statistics", + "agg_interval", "metadata", "statistics", "execution_count", "service_latency", "cpu_sql_nanos", + "contention_time", "total_estimated_execution_time", }, - ColumnIDs: []descpb.ColumnID{8, 1, 2, 3, 4, 5, 6, 7}, + ColumnIDs: []descpb.ColumnID{8, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13}, DefaultColumnID: 0, }, }, @@ -2618,6 +2769,105 @@ var ( KeySuffixColumnIDs: []descpb.ColumnID{8, 1, 3, 4}, Version: descpb.StrictIndexColumnIDGuaranteesVersion, }, + descpb.IndexDescriptor{ + Name: "execution_count_idx", + ID: 3, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "execution_count", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 3, 9}, + KeySuffixColumnIDs: []descpb.ColumnID{8, 2, 4}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "service_latency_idx", + ID: 4, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "service_latency", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 3, 10}, + KeySuffixColumnIDs: []descpb.ColumnID{8, 2, 4}, + CompositeColumnIDs: []descpb.ColumnID{10}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "cpu_sql_nanos_idx", + ID: 5, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "cpu_sql_nanos", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 3, 11}, + KeySuffixColumnIDs: []descpb.ColumnID{8, 2, 4}, + CompositeColumnIDs: []descpb.ColumnID{11}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "contention_time_idx", + ID: 6, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "contention_time", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 3, 12}, + KeySuffixColumnIDs: []descpb.ColumnID{8, 2, 4}, + CompositeColumnIDs: []descpb.ColumnID{12}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, + descpb.IndexDescriptor{ + Name: "total_estimated_execution_time_idx", + ID: 7, + Unique: false, + KeyColumnNames: []string{ + "aggregated_ts", + "app_name", + "total_estimated_execution_time", + }, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{ + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_ASC, + catenumpb.IndexColumn_DESC, + }, + KeyColumnIDs: []descpb.ColumnID{1, 3, 13}, + KeySuffixColumnIDs: []descpb.ColumnID{8, 2, 4}, + CompositeColumnIDs: []descpb.ColumnID{13}, + Version: descpb.StrictIndexColumnIDGuaranteesVersion, + Predicate: "app_name NOT LIKE '$ internal%':::STRING", + }, ), func(tbl *descpb.TableDescriptor) { tbl.Checks = []*descpb.TableDescriptor_CheckConstraint{{ diff --git a/pkg/sql/catalog/systemschema_test/testdata/bootstrap b/pkg/sql/catalog/systemschema_test/testdata/bootstrap index 2dfaef3a6b63..cc2531ccf09e 100644 --- a/pkg/sql/catalog/systemschema_test/testdata/bootstrap +++ b/pkg/sql/catalog/systemschema_test/testdata/bootstrap @@ -331,9 +331,19 @@ CREATE TABLE public.statement_statistics ( crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 INT4 NOT VISIBLE NOT NULL AS (mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), 8:::INT8)) STORED, index_recommendations STRING[] NOT NULL DEFAULT ARRAY[]:::STRING[], indexes_usage JSONB NULL AS ((statistics->'statistics':::STRING)->'indexes':::STRING) VIRTUAL, + execution_count INT8 NULL AS (((statistics->'execution_statistics':::STRING)->'cnt':::STRING)::INT8) STORED, + service_latency FLOAT8 NULL AS ((((statistics->'statistics':::STRING)->'svcLat':::STRING)->'mean':::STRING)::FLOAT8) STORED, + cpu_sql_nanos FLOAT8 NULL AS ((((statistics->'execution_statistics':::STRING)->'cpuSQLNanos':::STRING)->'mean':::STRING)::FLOAT8) STORED, + contention_time FLOAT8 NULL AS ((((statistics->'execution_statistics':::STRING)->'contentionTime':::STRING)->'mean':::STRING)::FLOAT8) STORED, + total_estimated_execution_time FLOAT8 NULL AS (((statistics->'execution_statistics':::STRING)->>'cnt':::STRING)::FLOAT8 * (((statistics->'statistics':::STRING)->'svcLat':::STRING)->>'mean':::STRING)::FLOAT8) STORED, CONSTRAINT "primary" PRIMARY KEY (aggregated_ts ASC, fingerprint_id ASC, transaction_fingerprint_id ASC, plan_hash ASC, app_name ASC, node_id ASC) USING HASH WITH (bucket_count=8), INDEX fingerprint_stats_idx (fingerprint_id ASC, transaction_fingerprint_id ASC), - INVERTED INDEX indexes_usage_idx (indexes_usage) + INVERTED INDEX indexes_usage_idx (indexes_usage), + INDEX execution_count_idx (aggregated_ts ASC, app_name ASC, execution_count DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX service_latency_idx (aggregated_ts ASC, app_name ASC, service_latency DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX cpu_sql_nanos_idx (aggregated_ts ASC, app_name ASC, cpu_sql_nanos DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX contention_time_idx (aggregated_ts ASC, app_name ASC, contention_time DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX total_estimated_execution_time_idx (aggregated_ts ASC, app_name ASC, total_estimated_execution_time DESC) WHERE app_name NOT LIKE '$ internal%':::STRING ); CREATE TABLE public.transaction_statistics ( aggregated_ts TIMESTAMPTZ NOT NULL, @@ -344,8 +354,18 @@ CREATE TABLE public.transaction_statistics ( metadata JSONB NOT NULL, statistics JSONB NOT NULL, crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 INT4 NOT VISIBLE NOT NULL AS (mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), 8:::INT8)) STORED, + execution_count INT8 NULL AS (((statistics->'execution_statistics':::STRING)->'cnt':::STRING)::INT8) STORED, + service_latency FLOAT8 NULL AS ((((statistics->'statistics':::STRING)->'svcLat':::STRING)->'mean':::STRING)::FLOAT8) STORED, + cpu_sql_nanos FLOAT8 NULL AS ((((statistics->'execution_statistics':::STRING)->'cpuSQLNanos':::STRING)->'mean':::STRING)::FLOAT8) STORED, + contention_time FLOAT8 NULL AS ((((statistics->'execution_statistics':::STRING)->'contentionTime':::STRING)->'mean':::STRING)::FLOAT8) STORED, + total_estimated_execution_time FLOAT8 NULL AS (((statistics->'execution_statistics':::STRING)->>'cnt':::STRING)::FLOAT8 * (((statistics->'statistics':::STRING)->'svcLat':::STRING)->>'mean':::STRING)::FLOAT8) STORED, CONSTRAINT "primary" PRIMARY KEY (aggregated_ts ASC, fingerprint_id ASC, app_name ASC, node_id ASC) USING HASH WITH (bucket_count=8), - INDEX fingerprint_stats_idx (fingerprint_id ASC) + INDEX fingerprint_stats_idx (fingerprint_id ASC), + INDEX execution_count_idx (aggregated_ts ASC, app_name ASC, execution_count DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX service_latency_idx (aggregated_ts ASC, app_name ASC, service_latency DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX cpu_sql_nanos_idx (aggregated_ts ASC, app_name ASC, cpu_sql_nanos DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX contention_time_idx (aggregated_ts ASC, app_name ASC, contention_time DESC) WHERE app_name NOT LIKE '$ internal%':::STRING, + INDEX total_estimated_execution_time_idx (aggregated_ts ASC, app_name ASC, total_estimated_execution_time DESC) WHERE app_name NOT LIKE '$ internal%':::STRING ); CREATE TABLE public.database_role_settings ( database_id OID NOT NULL, @@ -513,14 +533,14 @@ schema_telemetry {"table":{"name":"statement_bundle_chunks","id":34,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"description","id":2,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"data","id":3,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":4,"families":[{"name":"primary","columnNames":["id","description","data"],"columnIds":[1,2,3]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["description","data"],"keyColumnIds":[1],"storeColumnIds":[2,3],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics","id":36,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"statement_fingerprint","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"statement","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"collected_at","id":4,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"trace","id":5,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"bundle_chunks","id":6,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}},"nullable":true},{"name":"error","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["id","statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"statement_statistics","id":42,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"transaction_fingerprint_id","id":3,"type":{"family":"BytesFamily","oid":17}},{"name":"plan_hash","id":4,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":7,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":8,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":9,"type":{"family":"JsonFamily","oid":3802}},{"name":"plan","id":10,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","id":11,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), _:::INT8)"},{"name":"index_recommendations","id":12,"type":{"family":"ArrayFamily","arrayElemType":"StringFamily","oid":1009,"arrayContents":{"family":"StringFamily","oid":25}},"defaultExpr":"ARRAY[]:::STRING[]"},{"name":"indexes_usage","id":13,"type":{"family":"JsonFamily","oid":3802},"nullable":true,"computeExpr":"(statistics-\u003e'_':::STRING)-\u003e'_':::STRING","virtual":true}],"nextColumnId":14,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id","agg_interval","metadata","statistics","plan","index_recommendations"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","plan","index_recommendations"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id","plan_hash","transaction_fingerprint_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id","transaction_fingerprint_id"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[2,3],"keySuffixColumnIds":[11,1,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"indexes_usage_idx","id":3,"version":3,"keyColumnNames":["indexes_usage"],"keyColumnDirections":["ASC"],"invertedColumnKinds":["DEFAULT"],"keyColumnIds":[13],"keySuffixColumnIds":[11,1,2,3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"type":"INVERTED","sharded":{},"geoConfig":{}}],"nextIndexId":4,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","columnIds":[11],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"statement_statistics","id":42,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"transaction_fingerprint_id","id":3,"type":{"family":"BytesFamily","oid":17}},{"name":"plan_hash","id":4,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":7,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":8,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":9,"type":{"family":"JsonFamily","oid":3802}},{"name":"plan","id":10,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","id":11,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), _:::INT8)"},{"name":"index_recommendations","id":12,"type":{"family":"ArrayFamily","arrayElemType":"StringFamily","oid":1009,"arrayContents":{"family":"StringFamily","oid":25}},"defaultExpr":"ARRAY[]:::STRING[]"},{"name":"indexes_usage","id":13,"type":{"family":"JsonFamily","oid":3802},"nullable":true,"computeExpr":"(statistics-\u003e'_':::STRING)-\u003e'_':::STRING","virtual":true},{"name":"execution_count","id":14,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":15,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":16,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":17,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":18,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":19,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id","agg_interval","metadata","statistics","plan","index_recommendations","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,18]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","plan","index_recommendations","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12,14,15,16,17,18],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id","plan_hash","transaction_fingerprint_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id","transaction_fingerprint_id"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[2,3],"keySuffixColumnIds":[11,1,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"indexes_usage_idx","id":3,"version":3,"keyColumnNames":["indexes_usage"],"keyColumnDirections":["ASC"],"invertedColumnKinds":["DEFAULT"],"keyColumnIds":[13],"keySuffixColumnIds":[11,1,2,3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"type":"INVERTED","sharded":{},"geoConfig":{}},{"name":"execution_count_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,14],"keySuffixColumnIds":[11,2,3,4,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,15],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[15],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,16],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[16],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,17],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[17],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,18],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[18],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":9,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","columnIds":[11],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"table_statistics","id":20,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tableID","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"statisticID","id":2,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"name","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"columnIDs","id":4,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}}},{"name":"createdAt","id":5,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"rowCount","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"distinctCount","id":7,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"nullCount","id":8,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"histogram","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"avgSize","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"_:::INT8"},{"name":"partialPredicate","id":11,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"fullStatisticID","id":12,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_tableID_statisticID_name_columnIDs_createdAt_rowCount_distinctCount_nullCount_histogram","columnNames":["tableID","statisticID","name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tableID","statisticID"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"task_payloads","id":58,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":2,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"owner","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"owner_id","id":4,"type":{"family":"OidFamily","oid":26},"nullable":true},{"name":"min_version","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"description","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"type","id":7,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":8,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","created","owner","owner_id","min_version","description","type","value"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["created","owner","owner_id","min_version","description","type","value"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenant_settings","id":50,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"name","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"last_updated","id":4,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"value_type","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"reason","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":7,"families":[{"name":"fam_0_tenant_id_name_value_last_updated_value_type_reason","columnNames":["tenant_id","name","value","last_updated","value_type","reason"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","name"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["value","last_updated","value_type","reason"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenant_tasks","id":59,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"issuer","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"task_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"created","id":4,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"payload_id","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"owner","id":6,"type":{"family":"StringFamily","oid":25}},{"name":"owner_id","id":7,"type":{"family":"OidFamily","oid":26},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["tenant_id","issuer","task_id","created","payload_id","owner","owner_id"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","issuer","task_id"],"keyColumnDirections":["ASC","ASC","ASC"],"storeColumnNames":["created","payload_id","owner","owner_id"],"keyColumnIds":[1,2,3],"storeColumnIds":[4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenant_usage","id":45,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"instance_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"next_instance_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"last_update","id":4,"type":{"family":"TimestampFamily","oid":1114}},{"name":"ru_burst_limit","id":5,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_refill_rate","id":6,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_current","id":7,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"current_share_sum","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"total_consumption","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_lease","id":10,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_seq","id":11,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"instance_shares","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":13,"families":[{"name":"primary","columnNames":["tenant_id","instance_id","next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","instance_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenants","id":8,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"active","id":2,"type":{"oid":16},"defaultExpr":"true","hidden":true},{"name":"info","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"name","id":4,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"data_state","id":5,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"service_mode","id":6,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","active","info","name","data_state","service_mode"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["active","info","name","data_state","service_mode"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"tenants_name_idx","id":2,"unique":true,"version":3,"keyColumnNames":["name"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1},{"name":"tenants_service_mode_idx","id":3,"version":3,"keyColumnNames":["service_mode"],"keyColumnDirections":["ASC"],"keyColumnIds":[6],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":4,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"},{"name":"execution_count","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":10,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":11,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":13,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":14,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"columnIds":[8,1,2,3,4,5,6,7,9,10,11,12,13]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7,9,10,11,12,13],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"execution_count_idx","id":3,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,9],"keySuffixColumnIds":[8,2,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,10],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[10],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,11],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[11],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,12],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[12],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,13],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[13],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":8,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"ui","id":14,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"key","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"lastUpdated","id":3,"type":{"family":"TimestampFamily","oid":1114}}],"nextColumnId":4,"families":[{"name":"primary","columnNames":["key"],"columnIds":[1]},{"name":"fam_2_value","id":2,"columnNames":["value"],"columnIds":[2],"defaultColumnId":2},{"name":"fam_3_lastUpdated","id":3,"columnNames":["lastUpdated"],"columnIds":[3],"defaultColumnId":3}],"nextFamilyId":4,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["key"],"keyColumnDirections":["ASC"],"storeColumnNames":["value","lastUpdated"],"keyColumnIds":[1],"storeColumnIds":[2,3],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"users","id":4,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"username","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"hashedPassword","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"isRole","id":3,"type":{"oid":16},"defaultExpr":"false"},{"name":"user_id","id":4,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["username","user_id"],"columnIds":[1,4],"defaultColumnId":4},{"name":"fam_2_hashedPassword","id":2,"columnNames":["hashedPassword"],"columnIds":[2],"defaultColumnId":2},{"name":"fam_3_isRole","id":3,"columnNames":["isRole"],"columnIds":[3],"defaultColumnId":3}],"nextFamilyId":4,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["username"],"keyColumnDirections":["ASC"],"storeColumnNames":["hashedPassword","isRole","user_id"],"keyColumnIds":[1],"storeColumnIds":[2,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"users_user_id_idx","id":2,"unique":true,"version":3,"keyColumnNames":["user_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"web_sessions","id":19,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"hashedSecret","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"username","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"createdAt","id":4,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"expiresAt","id":5,"type":{"family":"TimestampFamily","oid":1114}},{"name":"revokedAt","id":6,"type":{"family":"TimestampFamily","oid":1114},"nullable":true},{"name":"lastUsedAt","id":7,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"auditInfo","id":8,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"user_id","id":9,"type":{"family":"OidFamily","oid":26},"nullable":true}],"nextColumnId":10,"families":[{"name":"fam_0_id_hashedSecret_username_createdAt_expiresAt_revokedAt_lastUsedAt_auditInfo","columnNames":["id","hashedSecret","username","createdAt","expiresAt","revokedAt","lastUsedAt","auditInfo","user_id"],"columnIds":[1,2,3,4,5,6,7,8,9]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["hashedSecret","username","createdAt","expiresAt","revokedAt","lastUsedAt","auditInfo","user_id"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8,9],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"web_sessions_expiresAt_idx","id":2,"version":3,"keyColumnNames":["expiresAt"],"keyColumnDirections":["ASC"],"keyColumnIds":[5],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"web_sessions_createdAt_idx","id":3,"version":3,"keyColumnNames":["createdAt"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"web_sessions_revokedAt_idx","id":4,"version":3,"keyColumnNames":["revokedAt"],"keyColumnDirections":["ASC"],"keyColumnIds":[6],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"web_sessions_lastUsedAt_idx","id":5,"version":3,"keyColumnNames":["lastUsedAt"],"keyColumnDirections":["ASC"],"keyColumnIds":[7],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":6,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} @@ -539,7 +559,7 @@ schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 {"table":{"name":"sql_instances","id":46,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"addr","id":2,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"session_id","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"locality","id":4,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"sql_addr","id":5,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"crdb_region","id":6,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","addr","session_id","locality","sql_addr","crdb_region"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":2,"unique":true,"version":4,"keyColumnNames":["crdb_region","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["addr","session_id","locality","sql_addr"],"keyColumnIds":[6,1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics","id":36,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"statement_fingerprint","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"statement","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"collected_at","id":4,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"trace","id":5,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"bundle_chunks","id":6,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}},"nullable":true},{"name":"error","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["id","statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"},{"name":"execution_count","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":10,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":11,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":13,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":14,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"columnIds":[8,1,2,3,4,5,6,7,9,10,11,12,13]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7,9,10,11,12,13],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"execution_count_idx","id":3,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,9],"keySuffixColumnIds":[8,2,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,10],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[10],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,11],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[11],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,12],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[12],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,13],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[13],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":8,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 ---- @@ -552,4 +572,4 @@ schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 {"table":{"name":"sql_instances","id":46,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"addr","id":2,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"session_id","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"locality","id":4,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"sql_addr","id":5,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"crdb_region","id":6,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","addr","session_id","locality","sql_addr","crdb_region"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":2,"unique":true,"version":4,"keyColumnNames":["crdb_region","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["addr","session_id","locality","sql_addr"],"keyColumnIds":[6,1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics","id":36,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"statement_fingerprint","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"statement","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"collected_at","id":4,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"trace","id":5,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"bundle_chunks","id":6,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}},"nullable":true},{"name":"error","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["id","statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"},{"name":"execution_count","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":10,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":11,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":13,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":14,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"columnIds":[8,1,2,3,4,5,6,7,9,10,11,12,13]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7,9,10,11,12,13],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"execution_count_idx","id":3,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,9],"keySuffixColumnIds":[8,2,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,10],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[10],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,11],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[11],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,12],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[12],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,13],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[13],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":8,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog index 58747d2e623c..ae36e1b72db0 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog @@ -136,8 +136,8 @@ SELECT id, strip_volatile(descriptor) FROM crdb_internal.kv_catalog_descriptor 39 {"table": {"columns": [{"id": 1, "name": "session_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 2, "name": "expiration", "type": {"family": "DecimalFamily", "oid": 1700}}, {"id": 3, "name": "crdb_region", "type": {"family": "BytesFamily", "oid": 17}}], "formatVersion": 3, "id": 39, "name": "sqlliveness", "nextColumnId": 4, "nextConstraintId": 2, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [3, 1], "keyColumnNames": ["crdb_region", "session_id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2], "storeColumnNames": ["expiration"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 40 {"table": {"columns": [{"id": 1, "name": "major", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 2, "name": "minor", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 3, "name": "patch", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 4, "name": "internal", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 5, "name": "completed_at", "type": {"family": "TimestampTZFamily", "oid": 1184}}], "formatVersion": 3, "id": 40, "name": "migrations", "nextColumnId": 6, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [1, 2, 3, 4], "keyColumnNames": ["major", "minor", "patch", "internal"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [5], "storeColumnNames": ["completed_at"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 41 {"table": {"columns": [{"id": 1, "name": "id", "type": {"family": "UuidFamily", "oid": 2950}}, {"id": 2, "name": "secret", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "expiration", "type": {"family": "TimestampTZFamily", "oid": 1184}}], "formatVersion": 3, "id": 41, "name": "join_tokens", "nextColumnId": 4, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2, 3], "storeColumnNames": ["secret", "expiration"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} -42 {"table": {"checks": [{"columnIds": [11], "constraintId": 2, "expr": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 IN (0:::INT8, 1:::INT8, 2:::INT8, 3:::INT8, 4:::INT8, 5:::INT8, 6:::INT8, 7:::INT8)", "fromHashShardedColumn": true, "name": "check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8"}], "columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "transaction_fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 4, "name": "plan_hash", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 5, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "node_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 7, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 8, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 9, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 10, "name": "plan", "type": {"family": "JsonFamily", "oid": 3802}}, {"computeExpr": "mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), 8:::INT8)", "hidden": true, "id": 11, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "type": {"family": "IntFamily", "oid": 23, "width": 32}}, {"defaultExpr": "ARRAY[]:::STRING[]", "id": 12, "name": "index_recommendations", "type": {"arrayContents": {"family": "StringFamily", "oid": 25}, "arrayElemType": "StringFamily", "family": "ArrayFamily", "oid": 1009}}, {"computeExpr": "(statistics->'statistics':::STRING)->'indexes':::STRING", "id": 13, "name": "indexes_usage", "nullable": true, "type": {"family": "JsonFamily", "oid": 3802}, "virtual": true}], "formatVersion": 3, "id": 42, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [2, 3], "keyColumnNames": ["fingerprint_id", "transaction_fingerprint_id"], "keySuffixColumnIds": [11, 1, 4, 5, 6], "name": "fingerprint_stats_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 3, "interleave": {}, "invertedColumnKinds": ["DEFAULT"], "keyColumnDirections": ["ASC"], "keyColumnIds": [13], "keyColumnNames": ["indexes_usage"], "keySuffixColumnIds": [11, 1, 2, 3, 4, 5, 6], "name": "indexes_usage_idx", "partitioning": {}, "sharded": {}, "type": "INVERTED", "version": 3}], "name": "statement_statistics", "nextColumnId": 14, "nextConstraintId": 3, "nextIndexId": 4, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [11, 1, 2, 3, 4, 5, 6], "keyColumnNames": ["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "aggregated_ts", "fingerprint_id", "transaction_fingerprint_id", "plan_hash", "app_name", "node_id"], "name": "primary", "partitioning": {}, "sharded": {"columnNames": ["aggregated_ts", "app_name", "fingerprint_id", "node_id", "plan_hash", "transaction_fingerprint_id"], "isSharded": true, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "shardBuckets": 8}, "storeColumnIds": [7, 8, 9, 10, 12], "storeColumnNames": ["agg_interval", "metadata", "statistics", "plan", "index_recommendations"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} -43 {"table": {"checks": [{"columnIds": [8], "constraintId": 2, "expr": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (0:::INT8, 1:::INT8, 2:::INT8, 3:::INT8, 4:::INT8, 5:::INT8, 6:::INT8, 7:::INT8)", "fromHashShardedColumn": true, "name": "check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8"}], "columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 4, "name": "node_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 5, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 6, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 7, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"computeExpr": "mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), 8:::INT8)", "hidden": true, "id": 8, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "type": {"family": "IntFamily", "oid": 23, "width": 32}}], "formatVersion": 3, "id": 43, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [2], "keyColumnNames": ["fingerprint_id"], "keySuffixColumnIds": [8, 1, 3, 4], "name": "fingerprint_stats_idx", "partitioning": {}, "sharded": {}, "version": 3}], "name": "transaction_statistics", "nextColumnId": 9, "nextConstraintId": 3, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [8, 1, 2, 3, 4], "keyColumnNames": ["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "aggregated_ts", "fingerprint_id", "app_name", "node_id"], "name": "primary", "partitioning": {}, "sharded": {"columnNames": ["aggregated_ts", "app_name", "fingerprint_id", "node_id"], "isSharded": true, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "shardBuckets": 8}, "storeColumnIds": [5, 6, 7], "storeColumnNames": ["agg_interval", "metadata", "statistics"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} +42 {"table": {"checks": [{"columnIds": [11], "constraintId": 2, "expr": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 IN (0:::INT8, 1:::INT8, 2:::INT8, 3:::INT8, 4:::INT8, 5:::INT8, 6:::INT8, 7:::INT8)", "fromHashShardedColumn": true, "name": "check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8"}], "columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "transaction_fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 4, "name": "plan_hash", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 5, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "node_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 7, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 8, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 9, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 10, "name": "plan", "type": {"family": "JsonFamily", "oid": 3802}}, {"computeExpr": "mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), 8:::INT8)", "hidden": true, "id": 11, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "type": {"family": "IntFamily", "oid": 23, "width": 32}}, {"defaultExpr": "ARRAY[]:::STRING[]", "id": 12, "name": "index_recommendations", "type": {"arrayContents": {"family": "StringFamily", "oid": 25}, "arrayElemType": "StringFamily", "family": "ArrayFamily", "oid": 1009}}, {"computeExpr": "(statistics->'statistics':::STRING)->'indexes':::STRING", "id": 13, "name": "indexes_usage", "nullable": true, "type": {"family": "JsonFamily", "oid": 3802}, "virtual": true}, {"computeExpr": "(statistics->'execution_statistics'->'cnt')::INT8", "id": 14, "name": "execution_count", "nullable": true, "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"computeExpr": "(statistics->'statistics'->'svcLat'->'mean')::FLOAT", "id": 15, "name": "service_latency", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->'cpuSQLNanos'->'mean')::FLOAT", "id": 16, "name": "cpu_sql_nanos", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->'contentionTime'->'mean')::FLOAT", "id": 17, "name": "contention_time", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->>'cnt')::float * (statistics->'statistics'->'svcLat'->>'mean')::FLOAT", "id": 18, "name": "total_estimated_execution_time", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}], "formatVersion": 3, "id": 42, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [2, 3], "keyColumnNames": ["fingerprint_id", "transaction_fingerprint_id"], "keySuffixColumnIds": [11, 1, 4, 5, 6], "name": "fingerprint_stats_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 3, "interleave": {}, "invertedColumnKinds": ["DEFAULT"], "keyColumnDirections": ["ASC"], "keyColumnIds": [13], "keyColumnNames": ["indexes_usage"], "keySuffixColumnIds": [11, 1, 2, 3, 4, 5, 6], "name": "indexes_usage_idx", "partitioning": {}, "sharded": {}, "type": "INVERTED", "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 4, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 5, 14], "keyColumnNames": ["aggregated_ts", "app_name", "execution_count"], "keySuffixColumnIds": [11, 2, 3, 4, 6], "name": "execution_count_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 5, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 5, 15], "keyColumnNames": ["aggregated_ts", "app_name", "service_latency"], "keySuffixColumnIds": [11, 2, 3, 4, 6], "name": "service_latency_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 6, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 5, 16], "keyColumnNames": ["aggregated_ts", "app_name", "cpu_sql_nanos"], "keySuffixColumnIds": [11, 2, 3, 4, 6], "name": "cpu_sql_nanos_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 7, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 5, 17], "keyColumnNames": ["aggregated_ts", "app_name", "contention_time"], "keySuffixColumnIds": [11, 2, 3, 4, 6], "name": "contention_time_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 8, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 5, 18], "keyColumnNames": ["aggregated_ts", "app_name", "total_estimated_execution_time"], "keySuffixColumnIds": [11, 2, 3, 4, 6], "name": "total_estimated_execution_time_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}], "name": "statement_statistics", "nextColumnId": 19, "nextConstraintId": 3, "nextIndexId": 9, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [11, 1, 2, 3, 4, 5, 6], "keyColumnNames": ["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "aggregated_ts", "fingerprint_id", "transaction_fingerprint_id", "plan_hash", "app_name", "node_id"], "name": "primary", "partitioning": {}, "sharded": {"columnNames": ["aggregated_ts", "app_name", "fingerprint_id", "node_id", "plan_hash", "transaction_fingerprint_id"], "isSharded": true, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8", "shardBuckets": 8}, "storeColumnIds": [7, 8, 9, 10, 12, 14, 15, 16, 17, 18], "storeColumnNames": ["agg_interval", "metadata", "statistics", "plan", "index_recommendations", "execution_count", "service_latency", "cpu_sql_nanos", "contention_time", "total_estimated_execution_time"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} +43 {"table": {"checks": [{"columnIds": [8], "constraintId": 2, "expr": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (0:::INT8, 1:::INT8, 2:::INT8, 3:::INT8, 4:::INT8, 5:::INT8, 6:::INT8, 7:::INT8)", "fromHashShardedColumn": true, "name": "check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8"}], "columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 4, "name": "node_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 5, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 6, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 7, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"computeExpr": "mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), 8:::INT8)", "hidden": true, "id": 8, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "type": {"family": "IntFamily", "oid": 23, "width": 32}}, {"computeExpr": "(statistics->'execution_statistics'->'cnt')::INT8", "id": 9, "name": "execution_count", "nullable": true, "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"computeExpr": "(statistics->'statistics'->'svcLat'->'mean')::FLOAT", "id": 10, "name": "service_latency", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->'cpuSQLNanos'->'mean')::FLOAT", "id": 11, "name": "cpu_sql_nanos", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->'contentionTime'->'mean')::FLOAT", "id": 12, "name": "contention_time", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"computeExpr": "(statistics->'execution_statistics'->>'cnt')::float * (statistics->'statistics'->'svcLat'->>'mean')::FLOAT", "id": 13, "name": "total_estimated_execution_time", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}], "formatVersion": 3, "id": 43, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [2], "keyColumnNames": ["fingerprint_id"], "keySuffixColumnIds": [8, 1, 3, 4], "name": "fingerprint_stats_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 3, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 3, 9], "keyColumnNames": ["aggregated_ts", "app_name", "execution_count"], "keySuffixColumnIds": [8, 2, 4, 5], "name": "execution_count_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 4, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 3, 10], "keyColumnNames": ["aggregated_ts", "app_name", "service_latency"], "keySuffixColumnIds": [8, 2, 4, 5], "name": "service_latency_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 5, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 3, 11], "keyColumnNames": ["aggregated_ts", "app_name", "cpu_sql_nanos"], "keySuffixColumnIds": [8, 2, 4, 5], "name": "cpu_sql_nanos_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 6, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 3, 12], "keyColumnNames": ["aggregated_ts", "app_name", "contention_time"], "keySuffixColumnIds": [8, 2, 4, 5], "name": "contention_time_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 7, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "DESC"], "keyColumnIds": [1, 3, 13], "keyColumnNames": ["aggregated_ts", "app_name", "total_estimated_execution_time"], "keySuffixColumnIds": [8, 2, 4, 5], "name": "total_estimated_execution_time_idx", "partitioning": {}, "predicate": "app_name NOT LIKE '$ internal%'", "sharded": {}, "version": 3}], "name": "transaction_statistics", "nextColumnId": 14, "nextConstraintId": 3, "nextIndexId": 8, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [8, 1, 2, 3, 4], "keyColumnNames": ["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "aggregated_ts", "fingerprint_id", "app_name", "node_id"], "name": "primary", "partitioning": {}, "sharded": {"columnNames": ["aggregated_ts", "app_name", "fingerprint_id", "node_id"], "isSharded": true, "name": "crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8", "shardBuckets": 8}, "storeColumnIds": [5, 6, 7, 9, 10, 11, 12, 13], "storeColumnNames": ["agg_interval", "metadata", "statistics", "execution_count", "service_latency", "cpu_sql_nanos", "contention_time", "total_estimated_execution_time"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 44 {"table": {"columns": [{"id": 1, "name": "database_id", "type": {"family": "OidFamily", "oid": 26}}, {"id": 2, "name": "role_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 3, "name": "settings", "type": {"arrayContents": {"family": "StringFamily", "oid": 25}, "arrayElemType": "StringFamily", "family": "ArrayFamily", "oid": 1009}}, {"id": 4, "name": "role_id", "nullable": true, "type": {"family": "OidFamily", "oid": 26}}], "formatVersion": 3, "id": 44, "indexes": [{"constraintId": 1, "foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [1, 4], "keyColumnNames": ["database_id", "role_id"], "keySuffixColumnIds": [2], "name": "database_role_settings_database_id_role_id_key", "partitioning": {}, "sharded": {}, "storeColumnIds": [3], "storeColumnNames": ["settings"], "unique": true, "version": 3}], "name": "database_role_settings", "nextColumnId": 5, "nextConstraintId": 3, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 2, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [1, 2], "keyColumnNames": ["database_id", "role_name"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [3, 4], "storeColumnNames": ["settings", "role_id"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 45 {"table": {"columns": [{"id": 1, "name": "tenant_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 2, "name": "instance_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 3, "name": "next_instance_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 4, "name": "last_update", "type": {"family": "TimestampFamily", "oid": 1114}}, {"id": 5, "name": "ru_burst_limit", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 6, "name": "ru_refill_rate", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 7, "name": "ru_current", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 8, "name": "current_share_sum", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 9, "name": "total_consumption", "nullable": true, "type": {"family": "BytesFamily", "oid": 17}}, {"id": 10, "name": "instance_lease", "nullable": true, "type": {"family": "BytesFamily", "oid": 17}}, {"id": 11, "name": "instance_seq", "nullable": true, "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 12, "name": "instance_shares", "nullable": true, "type": {"family": "FloatFamily", "oid": 701, "width": 64}}], "formatVersion": 3, "id": 45, "name": "tenant_usage", "nextColumnId": 13, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [1, 2], "keyColumnNames": ["tenant_id", "instance_id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "storeColumnNames": ["next_instance_id", "last_update", "ru_burst_limit", "ru_refill_rate", "ru_current", "current_share_sum", "total_consumption", "instance_lease", "instance_seq", "instance_shares"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 46 {"table": {"columns": [{"id": 1, "name": "id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 2, "name": "addr", "nullable": true, "type": {"family": "StringFamily", "oid": 25}}, {"id": 3, "name": "session_id", "nullable": true, "type": {"family": "BytesFamily", "oid": 17}}, {"id": 4, "name": "locality", "nullable": true, "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 5, "name": "sql_addr", "nullable": true, "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "crdb_region", "type": {"family": "BytesFamily", "oid": 17}}], "formatVersion": 3, "id": 46, "name": "sql_instances", "nextColumnId": 7, "nextConstraintId": 2, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [6, 1], "keyColumnNames": ["crdb_region", "id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2, 3, 4, 5], "storeColumnNames": ["addr", "session_id", "locality", "sql_addr"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} diff --git a/pkg/sql/logictest/testdata/logic_test/information_schema b/pkg/sql/logictest/testdata/logic_test/information_schema index 7873450983f7..fb91039bfff3 100644 --- a/pkg/sql/logictest/testdata/logic_test/information_schema +++ b/pkg/sql/logictest/testdata/logic_test/information_schema @@ -2398,7 +2398,10 @@ system public statement_diagnostics_requests statement_fingerpr system public statement_statistics agg_interval 7 system public statement_statistics aggregated_ts 1 system public statement_statistics app_name 5 +system public statement_statistics contention_time 17 +system public statement_statistics cpu_sql_nanos 16 system public statement_statistics crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 11 +system public statement_statistics execution_count 14 system public statement_statistics fingerprint_id 2 system public statement_statistics index_recommendations 12 system public statement_statistics indexes_usage 13 @@ -2406,7 +2409,9 @@ system public statement_statistics metadata system public statement_statistics node_id 6 system public statement_statistics plan 10 system public statement_statistics plan_hash 4 +system public statement_statistics service_latency 15 system public statement_statistics statistics 9 +system public statement_statistics total_estimated_execution_time 18 system public statement_statistics transaction_fingerprint_id 3 system public table_statistics avgSize 10 system public table_statistics columnIDs 4 @@ -2462,11 +2467,16 @@ system public tenants service_mode system public transaction_statistics agg_interval 5 system public transaction_statistics aggregated_ts 1 system public transaction_statistics app_name 3 +system public transaction_statistics contention_time 12 +system public transaction_statistics cpu_sql_nanos 11 system public transaction_statistics crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 8 +system public transaction_statistics execution_count 9 system public transaction_statistics fingerprint_id 2 system public transaction_statistics metadata 6 system public transaction_statistics node_id 4 +system public transaction_statistics service_latency 10 system public transaction_statistics statistics 7 +system public transaction_statistics total_estimated_execution_time 13 system public ui key 1 system public ui lastUpdated 3 system public ui value 2 diff --git a/pkg/sql/logictest/testdata/logic_test/pg_catalog b/pkg/sql/logictest/testdata/logic_test/pg_catalog index b0aee77af4ec..adf3a109191b 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -1123,9 +1123,14 @@ indexrelid indrelid indnatts indisunique indnullsnotdistinct indisprimary 543291292 23 2 true false false false true false true false false true false 4 5 0 0 0 0 2 2 NULL NULL 2 543291294 23 1 false false false false false false true false false true false 4 0 0 2 NULL NULL 1 543291295 23 1 false false false false false false true false false true false 5 0 0 2 NULL NULL 1 +663840560 42 3 false false false false false false true false false true false 1 5 17 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +663840561 42 3 false false false false false false true false false true false 1 5 16 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +663840562 42 3 false false false false false false true false false true false 1 5 15 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +663840563 42 3 false false false false false false true false false true false 1 5 14 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 663840564 42 1 false false false false false false true false false true false 13 0 0 2 NULL NULL 1 663840565 42 2 false false false false false false true false false true false 2 3 0 0 0 0 2 2 NULL NULL 2 663840566 42 6 true false true false true false true false false true false 1 2 3 4 5 6 0 0 0 0 3403232968 0 0 0 0 0 0 0 2 2 2 2 2 2 NULL NULL 6 +663840575 42 3 false false false false false false true false false true false 1 5 18 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 710236230 58 1 true false true false true false true false false true false 1 3403232968 0 2 NULL NULL 1 803027558 26 3 true false true false true false true false false true false 1 2 3 0 0 3403232968 0 0 0 2 2 2 NULL NULL 3 923576837 41 1 true false true false true false true false false true false 1 0 0 2 NULL NULL 1 @@ -1177,7 +1182,12 @@ indexrelid indrelid indnatts indisunique indnullsnotdistinct indisprimary 3446785912 4 1 true false true false true false true false false true false 1 3403232968 0 2 NULL NULL 1 3446785915 4 1 true false false false true false true false false true false 4 0 0 2 NULL NULL 1 3493181576 20 2 true false true false true false true false false true false 1 2 0 0 0 0 2 2 NULL NULL 2 +3613730848 43 3 false false false false false false true false false true false 1 3 12 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +3613730849 43 3 false false false false false false true false false true false 1 3 13 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +3613730850 43 3 false false false false false false true false false true false 1 3 10 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 +3613730851 43 3 false false false false false false true false false true false 1 3 11 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 3613730852 43 1 false false false false false false true false false true false 2 0 0 2 NULL NULL 1 +3613730853 43 3 false false false false false false true false false true false 1 3 9 0 3403232968 0 0 0 0 2 2 1 NULL app_name NOT LIKE '$ internal%'::STRING 3 3613730855 43 4 true false true false true false true false false true false 1 2 3 4 0 0 3403232968 0 0 0 0 0 2 2 2 2 NULL NULL 4 3660126519 59 3 true false true false true false true false false true false 1 2 3 0 3403232968 0 0 0 0 2 2 2 NULL NULL 3 3706522180 11 5 true false true false true false true false false true false 5 1 2 4 3 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 NULL NULL 5 @@ -1213,6 +1223,18 @@ indexrelid operator_argument_type_oid operator_argument_position 543291292 0 2 543291294 0 1 543291295 0 1 +663840560 0 1 +663840560 0 2 +663840560 0 3 +663840561 0 1 +663840561 0 2 +663840561 0 3 +663840562 0 1 +663840562 0 2 +663840562 0 3 +663840563 0 1 +663840563 0 2 +663840563 0 3 663840564 0 1 663840565 0 1 663840565 0 2 @@ -1222,6 +1244,9 @@ indexrelid operator_argument_type_oid operator_argument_position 663840566 0 4 663840566 0 5 663840566 0 6 +663840575 0 1 +663840575 0 2 +663840575 0 3 710236230 0 1 803027558 0 1 803027558 0 2 @@ -1300,7 +1325,22 @@ indexrelid operator_argument_type_oid operator_argument_position 3446785915 0 1 3493181576 0 1 3493181576 0 2 +3613730848 0 1 +3613730848 0 2 +3613730848 0 3 +3613730849 0 1 +3613730849 0 2 +3613730849 0 3 +3613730850 0 1 +3613730850 0 2 +3613730850 0 3 +3613730851 0 1 +3613730851 0 2 +3613730851 0 3 3613730852 0 1 +3613730853 0 1 +3613730853 0 2 +3613730853 0 3 3613730855 0 1 3613730855 0 2 3613730855 0 3 diff --git a/pkg/sql/sqlstats/persistedsqlstats/BUILD.bazel b/pkg/sql/sqlstats/persistedsqlstats/BUILD.bazel index df13b9e5e71a..ad4ad83bca8d 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/BUILD.bazel +++ b/pkg/sql/sqlstats/persistedsqlstats/BUILD.bazel @@ -102,6 +102,7 @@ go_test( "//pkg/util/leaktest", "//pkg/util/log", "//pkg/util/metric", + "//pkg/util/randutil", "//pkg/util/stop", "//pkg/util/syncutil", "//pkg/util/timeutil", diff --git a/pkg/sql/sqlstats/persistedsqlstats/bench_test.go b/pkg/sql/sqlstats/persistedsqlstats/bench_test.go index 0a8c7cd2d030..91d84dfe58a2 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/bench_test.go +++ b/pkg/sql/sqlstats/persistedsqlstats/bench_test.go @@ -11,18 +11,23 @@ package persistedsqlstats_test import ( + "bytes" "context" gosql "database/sql" "fmt" + "strings" "sync" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/sql" + "github.com/cockroachdb/cockroach/pkg/sql/sqlstats/persistedsqlstats" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" + "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" "github.com/cockroachdb/cockroach/pkg/util/log" + "github.com/cockroachdb/cockroach/pkg/util/randutil" "github.com/cockroachdb/cockroach/pkg/util/timeutil" ) @@ -79,3 +84,249 @@ func BenchmarkConcurrentSelect1(b *testing.B) { }) } } + +// runBenchmarkPersistedSqlStatsFlush benchmarks the persisted stats +func runBenchmarkPersistedSqlStatsFlush( + b *testing.B, tc *testcluster.TestCluster, db *sqlutils.SQLRunner, ctx context.Context, +) { + rng := randutil.NewTestRandWithSeed(0) + const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + b.ResetTimer() + for i := 0; i < b.N; i++ { + // Select 3000 rows + for j := 0; j < 3000; j++ { + appName := randutil.RandString(rng, 5, charset) + db.Exec(b, fmt.Sprintf("SET application_name='%s'", appName)) + db.Exec(b, "SELECT id FROM bench.t1 LIMIT 5") + } + b.StartTimer() + tc.Server(0).SQLServer().(*sql.Server).GetSQLStatsProvider().(*persistedsqlstats.PersistedSQLStats).Flush(ctx) + b.StopTimer() + } +} + +// runBenchmarkPersistedSqlStatsSelects benchmarks select statements +func runBenchmarkPersistedSqlStatsSelects(b *testing.B, db *sqlutils.SQLRunner, query string) { + b.ResetTimer() + for i := 0; i < b.N; i++ { + b.StartTimer() + rows := db.Query(b, query) + if err := rows.Err(); err != nil { + b.Fatal(err) + } + rows.Close() + b.StopTimer() + } +} + +// BenchmarkSqlStatsPersisted tests measures the performance of persisted statistics. +func BenchmarkSqlStatsPersisted(b *testing.B) { + skip.UnderShort(b) + defer log.Scope(b).Close(b) + + type clusterCreationFn func() (*sqlutils.SQLRunner, *testcluster.TestCluster) + type clusterSpec struct { + name string + create clusterCreationFn + } + for _, cluster := range []clusterSpec{ + { + name: "3node", + create: func() (*sqlutils.SQLRunner, *testcluster.TestCluster) { + tc := testcluster.StartTestCluster(b, 3, + base.TestClusterArgs{ + ReplicationMode: base.ReplicationAuto, + ServerArgs: base.TestServerArgs{ + UseDatabase: "bench", + SQLMemoryPoolSize: 512 << 20, + }, + }) + sqlRunner := sqlutils.MakeRoundRobinSQLRunner(tc.Conns[0], tc.Conns[1], tc.Conns[2]) + return sqlRunner, tc + }, + }, + { + name: "6node", + create: func() (*sqlutils.SQLRunner, *testcluster.TestCluster) { + tc := testcluster.StartTestCluster(b, 6, + base.TestClusterArgs{ + ReplicationMode: base.ReplicationAuto, + ServerArgs: base.TestServerArgs{ + UseDatabase: "bench", + SQLMemoryPoolSize: 512 << 20, + }, + }) + sqlRunner := sqlutils.MakeRoundRobinSQLRunner(tc.Conns[0], tc.Conns[1], tc.Conns[2], tc.Conns[3], + tc.Conns[4], tc.Conns[5]) + return sqlRunner, tc + }, + }, + } { + b.Run(cluster.name, func(b *testing.B) { + type testSpec struct { + // array of computed columns + computedColumns []string + // turn on span stat collection + forceComputedIndex bool + } + for _, test := range []testSpec{ + {computedColumns: []string{"execution_count", "service_latency", "cpu_sql_nanos", "contention_time", "total_estimated_execution_time"}, forceComputedIndex: true}, + {computedColumns: []string{"execution_count", "service_latency", "cpu_sql_nanos", "contention_time", "total_estimated_execution_time"}, forceComputedIndex: false}, + {computedColumns: []string{"execution_count", "service_latency", "cpu_sql_nanos", "contention_time"}, forceComputedIndex: false}, + {computedColumns: []string{"execution_count", "service_latency", "cpu_sql_nanos", "contention_time"}, forceComputedIndex: false}, + {computedColumns: []string{"execution_count", "service_latency", "cpu_sql_nanos"}, forceComputedIndex: false}, + {computedColumns: []string{"execution_count", "service_latency"}, forceComputedIndex: false}, + {computedColumns: []string{"execution_count"}, forceComputedIndex: false}, + {computedColumns: []string{}, forceComputedIndex: false}, + } { + + // compute expressions + executionCount := "((statistics->'execution_statistics'->'cnt')::INT8)" + serviceLatency := "((statistics->'statistics'->'svcLat'->'mean')::FLOAT)" + cpuSqlNanos := "((statistics->'execution_statistics'->'cpuSQLNanos'->'mean')::FLOAT)" + contentionTime := "((statistics->'execution_statistics'->'contentionTime'->'mean')::FLOAT)" + totalEstimatedExecutionTime := "(statistics->'execution_statistics'->>'cnt')::float * (statistics->'statistics'->'svcLat'->>'mean')::FLOAT" + computeExpressions := []string{executionCount, serviceLatency, cpuSqlNanos, contentionTime, totalEstimatedExecutionTime} + + // Indexes + executionCountIdx := "execution_count_idx" + serviceLatencyIdx := "service_latency_idx" + sqlCpuNanosIdx := "cpu_sql_nanos_idx" + contentionTimeIdx := "contention_time_idx" + totalEstimatedExecutionTimeIdx := "total_estimated_execution_time_idx" + computedIndexes := []string{executionCountIdx, serviceLatencyIdx, sqlCpuNanosIdx, contentionTimeIdx, totalEstimatedExecutionTimeIdx} + + // DROP INDEX queries + dropExecutionCountIdx := fmt.Sprintf("DROP INDEX system.transaction_statistics@%s; DROP INDEX system.statement_statistics@%s;", executionCountIdx, executionCountIdx) + dropServiceLatencyIdx := fmt.Sprintf("DROP INDEX system.transaction_statistics@%s; DROP INDEX system.statement_statistics@%s;", serviceLatencyIdx, serviceLatencyIdx) + dropSqlCpuNanosIdx := fmt.Sprintf("DROP INDEX system.transaction_statistics@%s; DROP INDEX system.statement_statistics@%s;", sqlCpuNanosIdx, sqlCpuNanosIdx) + dropContentionTimeIdx := fmt.Sprintf("DROP INDEX system.transaction_statistics@%s; DROP INDEX system.statement_statistics@%s;", contentionTimeIdx, contentionTimeIdx) + dropTotalEstimatedExecutionTimeIdx := fmt.Sprintf("DROP INDEX system.transaction_statistics@%s; DROP INDEX system.statement_statistics@%s;", totalEstimatedExecutionTimeIdx, totalEstimatedExecutionTimeIdx) + dropQueries := []string{dropExecutionCountIdx, dropServiceLatencyIdx, dropSqlCpuNanosIdx, dropContentionTimeIdx, dropTotalEstimatedExecutionTimeIdx} + + var name strings.Builder + if test.forceComputedIndex { + name.WriteString("forceComputedIndex=true") + } else { + name.WriteString("forceComputedIndex=false") + } + if test.computedColumns == nil { + name.WriteString("computedColumns=none") + } else { + name.WriteString(fmt.Sprintf("computedColumns=%d", len(test.computedColumns))) + } + for i, val := range test.computedColumns { + if i > len(dropQueries) { + dropQueries = []string{} + } else { + dropQueries = dropQueries[1:] + } + computeExpressions[i] = val + } + var selectQueries []string + for i := range computeExpressions { + index := "" + if test.forceComputedIndex { + index = "@" + computedIndexes[i] + } + orderClause := fmt.Sprintf(" ORDER BY %s DESC LIMIT 500", computeExpressions[i]) + baseQuery := fmt.Sprintf(`SELECT + app_name, + aggregated_ts, + fingerprint_id, + %s, + %s, + %s, + %s, + %s, + metadata, + statistics + FROM system.transaction_statistics%s + WHERE app_name NOT LIKE '$ internal%%' AND aggregated_ts > (now() - INTERVAL '1 hour') %s`, + computeExpressions[0], + computeExpressions[1], + computeExpressions[2], + computeExpressions[3], + computeExpressions[4], + index, + orderClause) + selectQueries = append(selectQueries, baseQuery) + } + txnStatsQuery := fmt.Sprintf("SELECT * FROM ((%s) UNION (%s) UNION (%s) UNION (%s) UNION (%s))", + selectQueries[0], selectQueries[1], selectQueries[2], selectQueries[3], selectQueries[4]) + + selectQueries = []string{} + for i := range computeExpressions { + index := "" + if test.forceComputedIndex { + index = "@" + computedIndexes[i] + } + orderClause := fmt.Sprintf(" ORDER BY %s DESC LIMIT 500", computeExpressions[i]) + baseQuery := fmt.Sprintf(`SELECT + app_name, + aggregated_ts, + fingerprint_id, + transaction_fingerprint_id, + %s, + %s, + %s, + %s, + %s, + metadata, + statistics + FROM system.statement_statistics%s + WHERE app_name NOT LIKE '$ internal%%' AND aggregated_ts > (now() - INTERVAL '1 hour') %s`, + computeExpressions[0], + computeExpressions[1], + computeExpressions[2], + computeExpressions[3], + computeExpressions[4], + index, + orderClause) + selectQueries = append(selectQueries, baseQuery) + } + stmtStatsQuery := fmt.Sprintf("SELECT * FROM ((%s) UNION (%s) UNION (%s) UNION (%s) UNION (%s))", + selectQueries[0], selectQueries[1], selectQueries[2], selectQueries[3], selectQueries[4]) + b.Run(name.String(), func(b *testing.B) { + ctx := context.Background() + sqlRunner, tc := cluster.create() + defer tc.Stopper().Stop(ctx) + sqlRunner.Exec(b, `INSERT INTO system.users VALUES ('node', NULL, true, 3)`) + sqlRunner.Exec(b, `GRANT node TO root`) + sqlRunner.Exec(b, `CREATE DATABASE IF NOT EXISTS bench`) + for _, query := range dropQueries { + sqlRunner.Exec(b, query) + } + sqlRunner.Exec(b, "CREATE TABLE bench.t1 (id UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid())") + + // Insert 10000 rows + var buf bytes.Buffer + buf.WriteString("INSERT INTO bench.t1 (id) VALUES (DEFAULT)") + for j := 0; j < 10000; j++ { + if j > 0 { + buf.WriteString(", (DEFAULT)") + } + } + sqlRunner.Exec(b, buf.String()) + buf.Reset() + + b.ReportAllocs() + // Run flush benchmark first to initialize stats tables + b.Run("BenchmarkPersistedSqlStatsFlush", func(b *testing.B) { + runBenchmarkPersistedSqlStatsFlush(b, tc, sqlRunner, ctx) + }) + + // Run flush benchmark first to initialize stats tables + b.Run("BenchmarkPersistedSqlStatsSelectStatements", func(b *testing.B) { + runBenchmarkPersistedSqlStatsSelects(b, sqlRunner, stmtStatsQuery) + }) + + // Run flush benchmark first to initialize stats tables + b.Run("BenchmarkPersistedSqlStatsSelectTransactions", func(b *testing.B) { + runBenchmarkPersistedSqlStatsSelects(b, sqlRunner, txnStatsQuery) + }) + }) + } + }) + } +} diff --git a/pkg/upgrade/upgrades/BUILD.bazel b/pkg/upgrade/upgrades/BUILD.bazel index b05acdb18d6f..2378eab055b0 100644 --- a/pkg/upgrade/upgrades/BUILD.bazel +++ b/pkg/upgrade/upgrades/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "alter_table_statistics_partial_predicate_and_id.go", "backfill_jobs_info_table_migration.go", "create_auto_config_runner_job.go", + "create_computed_indexes_sql_statistics.go", "create_index_usage_statement_statistics.go", "create_jobs_metrics_polling_job.go", "create_task_system_tables.go", @@ -92,6 +93,7 @@ go_test( "backfill_jobs_info_table_migration_test.go", "builtins_test.go", "create_auto_config_runner_job_test.go", + "create_computed_indexes_sql_statistics_test.go", "create_index_usage_statement_statistics_test.go", "create_jobs_metrics_polling_job_test.go", "database_role_settings_table_user_id_migration_test.go", diff --git a/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics.go b/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics.go new file mode 100644 index 000000000000..47069b82b62b --- /dev/null +++ b/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics.go @@ -0,0 +1,273 @@ +// Copyright 2023 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package upgrades + +import ( + "context" + + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" + "github.com/cockroachdb/cockroach/pkg/upgrade" +) + +const addExecutionCountComputedColStmtStats = ` +ALTER TABLE system.statement_statistics +ADD COLUMN IF NOT EXISTS "execution_count" INT8 +AS ((statistics->'execution_statistics'->'cnt')::INT8) STORED +` + +const addIndexOnExecutionCountComputedColStmtStats = ` +CREATE INDEX execution_count_idx ON system.statement_statistics ( +aggregated_ts, app_name, execution_count DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addServiceLatencyComputedColStmtStats = ` +ALTER TABLE system.statement_statistics +ADD COLUMN IF NOT EXISTS "service_latency" FLOAT +AS ((statistics->'statistics'->'svcLat'->'mean')::FLOAT) STORED +` + +const addIndexOnServiceLatencyComputedColStmtStats = ` +CREATE INDEX service_latency_idx ON system.statement_statistics ( +aggregated_ts, app_name, service_latency DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addCpuSqlNanosComputedColStmtStats = ` +ALTER TABLE system.statement_statistics +ADD COLUMN IF NOT EXISTS "cpu_sql_nanos" FLOAT +AS ((statistics->'execution_statistics'->'cpuSQLNanos'->'mean')::FLOAT) STORED +` + +const addIndexOnCpuSqlNanosComputedColStmtStats = ` +CREATE INDEX cpu_sql_nanos_idx ON system.statement_statistics ( +aggregated_ts, app_name, cpu_sql_nanos DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addContentionTimeComputedColStmtStats = ` +ALTER TABLE system.statement_statistics +ADD COLUMN IF NOT EXISTS "contention_time" FLOAT +AS ((statistics->'execution_statistics'->'contentionTime'->'mean')::FLOAT) STORED +` + +const addIndexOnContentionTimeComputedColStmtStats = ` +CREATE INDEX contention_time_idx ON system.statement_statistics ( +aggregated_ts, app_name, contention_time DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addTotalEstimatedExecutionTimeComputedColStmtStats = ` +ALTER TABLE system.statement_statistics +ADD COLUMN IF NOT EXISTS "total_estimated_execution_time" FLOAT +AS ((statistics->'execution_statistics'->>'cnt')::float * (statistics->'statistics'->'svcLat'->>'mean')::FLOAT) STORED +` + +const addIndexOnTotalEstimatedExecutionTimeComputedColStmtStats = ` +CREATE INDEX total_estimated_execution_time_idx ON system.statement_statistics ( +aggregated_ts, app_name, total_estimated_execution_time DESC) WHERE app_name NOT LIKE +'$ internal%' +` + +// transaction_statistics +const addExecutionCountComputedColTxnStats = ` +ALTER TABLE system.transaction_statistics +ADD COLUMN IF NOT EXISTS "execution_count" INT8 +AS ((statistics->'execution_statistics'->'cnt')::INT8) STORED +` + +const addIndexOnExecutionCountComputedColTxnStats = ` +CREATE INDEX execution_count_idx ON system.transaction_statistics ( +aggregated_ts, app_name, execution_count DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addServiceLatencyComputedColTxnStats = ` +ALTER TABLE system.transaction_statistics +ADD COLUMN IF NOT EXISTS "service_latency" FLOAT +AS ((statistics->'statistics'->'svcLat'->'mean')::FLOAT) STORED +` + +const addIndexOnServiceLatencyComputedColTxnStats = ` +CREATE INDEX service_latency_idx ON system.transaction_statistics ( +aggregated_ts, app_name, service_latency DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addCpuSqlNanosComputedColTxnStats = ` +ALTER TABLE system.transaction_statistics +ADD COLUMN IF NOT EXISTS "cpu_sql_nanos" FLOAT +AS ((statistics->'execution_statistics'->'cpuSQLNanos'->'mean')::FLOAT) STORED +` + +const addIndexOnCpuSqlNanosComputedColTxnStats = ` +CREATE INDEX cpu_sql_nanos_idx ON system.transaction_statistics ( +aggregated_ts, app_name, cpu_sql_nanos DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addContentionTimeComputedColTxnStats = ` +ALTER TABLE system.transaction_statistics +ADD COLUMN IF NOT EXISTS "contention_time" FLOAT +AS ((statistics->'execution_statistics'->'contentionTime'->'mean')::FLOAT) STORED +` + +const addIndexOnContentionTimeComputedColTxnStats = ` +CREATE INDEX contention_time_idx ON system.transaction_statistics ( +aggregated_ts, app_name, contention_time DESC) WHERE app_name NOT LIKE +'$ internal%' +` +const addTotalEstimatedExecutionTimeComputedColTxnStats = ` +ALTER TABLE system.transaction_statistics +ADD COLUMN IF NOT EXISTS "total_estimated_execution_time" FLOAT +AS ((statistics->'execution_statistics'->>'cnt')::float * (statistics->'statistics'->'svcLat'->>'mean')::FLOAT) STORED +` + +const addIndexOnTotalEstimatedExecutionTimeComputedColTxnStats = ` +CREATE INDEX total_estimated_execution_time_idx ON system.transaction_statistics ( +aggregated_ts, app_name, total_estimated_execution_time DESC) WHERE app_name NOT LIKE +'$ internal%' +` + +func createComputedIndexesOnSystemSQLStatistics( + ctx context.Context, cs clusterversion.ClusterVersion, d upgrade.TenantDeps, +) error { + for _, op := range []operation{ + { + name: "create-execution-count-computed-col-stmt-stats", + schemaList: []string{"execution_count"}, + query: addExecutionCountComputedColStmtStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-execution-count-idx-stmt-stats", + schemaList: []string{"execution_count_idx"}, + query: addIndexOnExecutionCountComputedColStmtStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-service-latency-computed-col-stmt-stats", + schemaList: []string{"service_latency"}, + query: addServiceLatencyComputedColStmtStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-service-latency-idx-stmt-stats", + schemaList: []string{"service_latency_idx"}, + query: addIndexOnServiceLatencyComputedColStmtStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-cpu-sql-nanos-computed-col-stmt-stats", + schemaList: []string{"cpu_sql_nanos"}, + query: addCpuSqlNanosComputedColStmtStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-cpu-sql-nanos-idx-stmt-stats", + schemaList: []string{"cpu_sql_nanos_idx"}, + query: addIndexOnCpuSqlNanosComputedColStmtStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-contention-time-computed-col-stmt-stats", + schemaList: []string{"contention_time"}, + query: addContentionTimeComputedColStmtStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-contention-time-idx-stmt-stats", + schemaList: []string{"contention_time_idx"}, + query: addIndexOnContentionTimeComputedColStmtStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-total-estimated-execution-time-computed-col-stmt-stats", + schemaList: []string{"total_estimated_execution_time"}, + query: addTotalEstimatedExecutionTimeComputedColStmtStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-total-estimated-execution-time-idx-stmt-stats", + schemaList: []string{"total_estimated_execution_time_idx"}, + query: addIndexOnTotalEstimatedExecutionTimeComputedColStmtStats, + schemaExistsFn: hasIndex, + }, + } { + if err := migrateTable(ctx, cs, d, op, keys.StatementStatisticsTableID, systemschema.StatementStatisticsTable); err != nil { + return err + } + } + + for _, op := range []operation{ + { + name: "create-execution-count-computed-col-txn-stats", + schemaList: []string{"execution_count"}, + query: addExecutionCountComputedColTxnStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-execution-count-idx-txn-stats", + schemaList: []string{"execution_count_idx"}, + query: addIndexOnExecutionCountComputedColTxnStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-service-latency-computed-col-txn-stats", + schemaList: []string{"service_latency"}, + query: addServiceLatencyComputedColTxnStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-service-latency-idx-txn-stats", + schemaList: []string{"service_latency_idx"}, + query: addIndexOnServiceLatencyComputedColTxnStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-cpu-sql-nanos-computed-col-txn-stats", + schemaList: []string{"cpu_sql_nanos"}, + query: addCpuSqlNanosComputedColTxnStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-cpu-sql-nanos-idx-txn-stats", + schemaList: []string{"cpu_sql_nanos_idx"}, + query: addIndexOnCpuSqlNanosComputedColTxnStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-contention-time-computed-col-txn-stats", + schemaList: []string{"contention_time"}, + query: addContentionTimeComputedColTxnStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-contention-time-idx-txn-stats", + schemaList: []string{"contention_time_idx"}, + query: addIndexOnContentionTimeComputedColTxnStats, + schemaExistsFn: hasIndex, + }, + { + name: "create-total-estimated-execution-time-computed-col-txn-stats", + schemaList: []string{"total_estimated_execution_time"}, + query: addTotalEstimatedExecutionTimeComputedColTxnStats, + schemaExistsFn: hasColumn, + }, + { + name: "create-total-estimated-execution-time-idx-txn-stats", + schemaList: []string{"total_estimated_execution_time_idx"}, + query: addIndexOnTotalEstimatedExecutionTimeComputedColTxnStats, + schemaExistsFn: hasIndex, + }, + } { + if err := migrateTable(ctx, cs, d, op, keys.TransactionStatisticsTableID, + systemschema.TransactionStatisticsTable); err != nil { + return err + } + } + return nil +} diff --git a/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go b/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go new file mode 100644 index 000000000000..2009420c6cea --- /dev/null +++ b/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go @@ -0,0 +1,99 @@ +// Copyright 2023 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package upgrades_test + +import ( + "context" + "testing" + + "github.com/cockroachdb/cockroach/pkg/base" + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/server" + "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" + "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" + "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" + "github.com/cockroachdb/cockroach/pkg/util/leaktest" + "github.com/cockroachdb/cockroach/pkg/util/log" +) + +func TestCreateComputedIndexesOnSystemSQLStatistics(t *testing.T) { + defer leaktest.AfterTest(t)() + defer log.Scope(t).Close(t) + + clusterArgs := base.TestClusterArgs{ + ServerArgs: base.TestServerArgs{ + Knobs: base.TestingKnobs{ + Server: &server.TestingKnobs{ + DisableAutomaticVersionUpgrade: make(chan struct{}), + BinaryVersionOverride: clusterversion.ByKey( + clusterversion.V23_1AddSQLStatsComputedIndexes - 1), + }, + }, + }, + } + + var ( + ctx = context.Background() + + tc = testcluster.StartTestCluster(t, 1, clusterArgs) + s = tc.Server(0) + sqlDB = tc.ServerConn(0) + ) + defer tc.Stopper().Stop(ctx) + + var ( + validationSchemas = []upgrades.Schema{ + {Name: "execution_count", ValidationFn: upgrades.HasColumn}, + {Name: "execution_count_idx", ValidationFn: upgrades.HasIndex}, + {Name: "service_latency", ValidationFn: upgrades.HasColumn}, + {Name: "service_latency_idx", ValidationFn: upgrades.HasIndex}, + {Name: "cpu_sql_nanos", ValidationFn: upgrades.HasColumn}, + {Name: "cpu_sql_nanos_idx", ValidationFn: upgrades.HasIndex}, + {Name: "contention_time", ValidationFn: upgrades.HasColumn}, + {Name: "contention_time_idx", ValidationFn: upgrades.HasIndex}, + {Name: "total_estimated_execution_time", ValidationFn: upgrades.HasColumn}, + {Name: "total_estimated_execution_time_idx", ValidationFn: upgrades.HasIndex}, + } + ) + + // Run the upgrade. + upgrades.Upgrade( + t, + sqlDB, + clusterversion.V23_1AddSQLStatsComputedIndexes, + nil, /* done */ + false, /* expectError */ + ) + // Validate that the tables have new schemas. + upgrades.ValidateSchemaExists( + ctx, + t, + s, + sqlDB, + keys.StatementStatisticsTableID, + systemschema.StatementStatisticsTable, + []string{}, + validationSchemas, + true, /* expectExists */ + ) + upgrades.ValidateSchemaExists( + ctx, + t, + s, + sqlDB, + keys.TransactionStatisticsTableID, + systemschema.TransactionStatisticsTable, + []string{}, + validationSchemas, + true, /* expectExists */ + ) +} diff --git a/pkg/upgrade/upgrades/upgrades.go b/pkg/upgrade/upgrades/upgrades.go index 0f5128abbbfa..74a4f0c304ca 100644 --- a/pkg/upgrade/upgrades/upgrades.go +++ b/pkg/upgrade/upgrades/upgrades.go @@ -292,6 +292,12 @@ var upgrades = []upgradebase.Upgrade{ createAutoConfigRunnerJob, "create auto config runner job", ), + upgrade.NewTenantUpgrade( + "create and index new computed columns on system sql stats tables", + toCV(clusterversion.V23_1AddSQLStatsComputedIndexes), + upgrade.NoPrecondition, + createComputedIndexesOnSystemSQLStatistics, + ), } func init() {