You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
106525: sql: add trie tree based workload index recommendations r=qiyanghe1998 a=qiyanghe1998
#### sql: add trie tree based workload index recommendations
This commit adds the trie and the logic for getting the workload index
recommendations. In addition, it fills the gap between built-in functions and
backend implementation for workload index recommendations. The whole process
consists of collecting candidates and finding representative indexes.
All the index recommendations in the table `system.statement_statistics`
(satisfying some time requirement) will be collected as the candidates and then
inserted to the trie.
The trie is designed for all the indexes of one table. The indexed columns will
be regarded as the key to insert into the tree in their original orders. The
storing part will be attached to the node after the insertion of indexed
columns.
The general idea of finding representative indexes is to use all the indexes
represented by the leaf nodes. One optimization is to use the remove the
storings that are covered by some leaf nodes. Next, we will push down all the
storings attached to the internal nodes to the shallowest leaf nodes (You can
find the reasons in RFC). Finally, all the indexes represented by the leaf
nodes will be returned.
As for the `DROP INDEX`, since we collect all the indexes represented by the
leaf nodes (a superset of dropped indexes), so we can directly drop all of
them.
Release note (sql change): new builtin functions `workload_index_recs()` and
`workload_index_recs(timestamptz)`, return workload level index recommendations
(columns of string, each string represent an index recommendation) from
statement level index recommendations (as candidates) in
`system.statement_statistics`. If the timestamptz is given, it will only
consider those candidates who is generated after that timestampsz.
Epic: None
107743: sql: Add new builtin generator function `crdb_internal.scan_storage_internal_keys()` r=RahulAggarwal1016 a=RahulAggarwal1016
This new builtin is used to gather specific pebble metrics for a node and store id (within an given keyspan). The builtin returns information about the different types of keys (including snapshot pinned keys) and bytes.
Informs: cockroachdb#94659
Release-note: None
108516: backupccl: fix error message for descriptor version mismatch r=adityamaru a=renatolabs
Expected and actual versions were swapped.
Epic: none
Release note: None
108520: backupccl: remove spurious print line in test r=msbutler a=msbutler
Print statements should not be in commited code
Epic: none
Release note: none
108531: roachtest: Ensure tpcc workloads runs for a bit r=miretskiy a=miretskiy
An issue in roachtest cockroachdb#108530 prevents clean test
termination when calling Wait() on a test monitor
that did not have at least 1 task started.
This cause `cdc/kafka-oauth` test to hang.
Add a '30s' duration to the tpcc task to go around this problem.
Fixescockroachdb#108507
Release note: None
Co-authored-by: qiyanghe1998 <[email protected]>
Co-authored-by: craig[bot] <[email protected]>
Co-authored-by: Renato Costa <[email protected]>
Co-authored-by: Michael Butler <[email protected]>
Co-authored-by: Yevgeniy Miretskiy <[email protected]>
Copy file name to clipboardExpand all lines: docs/generated/sql/functions.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1386,11 +1386,7 @@ the locality flag on node startup. Returns an error if no region is set.</p>
1386
1386
</span></td><td>Immutable</td></tr>
1387
1387
<tr><td><aname="workload_index_recs"></a><code>workload_index_recs() → <ahref="string.html">string</a></code></td><td><spanclass="funcdesc"><p>Returns set of index recommendations</p>
1388
1388
</span></td><td>Immutable</td></tr>
1389
-
<tr><td><aname="workload_index_recs"></a><code>workload_index_recs(budget: <ahref="string.html">string</a>) → <ahref="string.html">string</a></code></td><td><spanclass="funcdesc"><p>Returns set of index recommendations</p>
1390
-
</span></td><td>Immutable</td></tr>
1391
1389
<tr><td><aname="workload_index_recs"></a><code>workload_index_recs(timestamptz: <ahref="timestamp.html">timestamptz</a>) → <ahref="string.html">string</a></code></td><td><spanclass="funcdesc"><p>Returns set of index recommendations</p>
1392
-
</span></td><td>Immutable</td></tr>
1393
-
<tr><td><aname="workload_index_recs"></a><code>workload_index_recs(timestamptz: <ahref="timestamp.html">timestamptz</a>, budget: <ahref="string.html">string</a>) → <ahref="string.html">string</a></code></td><td><spanclass="funcdesc"><p>Returns set of index recommendations</p>
0 commit comments