Skip to content

Commit 378efc8

Browse files
committed
builtins,workloadindexrec: Add fingerprint id to workload_index_recs builtin
Adds another column to the workload_index_recs builtin that contains an array of fingerprint ids that the recommended indexes were originally recommended for. Resolves: #141947 Epic: CRDB-42980 Release note (sql change): Changes the return type of the workload_index_recs builtin to be two columns. The first column, "index_rec", remains a string type that contains the index recommndation. The second column, "fingerprint_ids", is new and has the "byte[]" type.
1 parent bdbdbf1 commit 378efc8

File tree

8 files changed

+340
-159
lines changed

8 files changed

+340
-159
lines changed

docs/generated/sql/functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,9 +1554,9 @@ the locality flag on node startup. Returns an error if no region is set.</p>
15541554
</span></td><td>Immutable</td></tr>
15551555
<tr><td><a name="unnest"></a><code>unnest(input: anyelement[]) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Returns the input array as a set of rows</p>
15561556
</span></td><td>Immutable</td></tr>
1557-
<tr><td><a name="workload_index_recs"></a><code>workload_index_recs() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns set of index recommendations</p>
1557+
<tr><td><a name="workload_index_recs"></a><code>workload_index_recs() &rarr; tuple{string AS index_rec, bytes[] AS fingerprint_ids}</code></td><td><span class="funcdesc"><p>Returns index recommendations and the fingerprint ids that the indexes will impact</p>
15581558
</span></td><td>Immutable</td></tr>
1559-
<tr><td><a name="workload_index_recs"></a><code>workload_index_recs(timestamptz: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns set of index recommendations</p>
1559+
<tr><td><a name="workload_index_recs"></a><code>workload_index_recs(timestamptz: <a href="timestamp.html">timestamptz</a>) &rarr; tuple{string AS index_rec, bytes[] AS fingerprint_ids}</code></td><td><span class="funcdesc"><p>Returns index recommendations and the fingerprint ids that the indexes will impact</p>
15601560
</span></td><td>Immutable</td></tr></tbody>
15611561
</table>
15621562

0 commit comments

Comments
 (0)