Repository navigation
Log skip index use in query log - #99793
alexey-milovidov merged 17 commits into
Conversation
This reverts commit 8e6df20.
…index name just in case
… using minmax index to ensure skip index selection is deterministic
|
Workflow [PR], commit [52e269e] Summary: ✅ AI ReviewSummaryThis PR adds Findings❌ Blockers
ClickHouse Rules
Final Verdict
|
alexey-milovidov
left a comment
There was a problem hiding this comment.
Add at least one test with unusual table and index names, something with spaces hello, world and dots like my.favorite.index, and check that they are correctly quoted in the query_log.
…table and index names that might need back quoting
…st place and index granule filtering initializing counters
LLVM Coverage Report
Changed lines: 94.74% (90/95) · Uncovered code |
|
@grantholly-clickhouse Since this PR was reverted (I couldn't figure out why) - do you like to give it another try? |
|
I will try to resubmit later |
|
@grantholly-clickhouse, later means when? |
…ch (#194) Answers the open question the earlier deferred-shipping pass left behind: is there a version- or config-gated ClickHouse mechanism that would make a real, retrospective skip-index-effectiveness signal for the Indexing page honest, rather than invented? Findings: the exact feature was requested upstream (ClickHouse/ClickHouse#78676) and briefly shipped (ClickHouse/ClickHouse#99793, a system.query_log skip_indices column) but was merged and reverted the same day (~2026-03-28) over a correctness bug under use_skip_indexes_on_data_read=1 (the current default) - confirmed against current master source, not just changelog prose. Dormant upstream since a 2026-04-29 maintainer nudge with no follow-up located. No code changes - this is upstream-research documentation only, already referenced by docs-internal/planning/roadmap.md's existing "Research: a real skip-index effectiveness signal" bullet. Co-authored-by: Claude Sonnet 5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
We now track any data skipping indices that were used during query execution in the query_log table in a new column named skip_indices. Fixes #78676. Original author @pheepa
Documentation entry for user-facing changes
Adds a new Array[String] column to system.query_log for any data skipping indexes used during query execution
###Details
This PR reintroduces #87862
Here I am trying to add the list of skip indexes used during execution to the query_log table. I want to add the skip index to the QueryAccessInfo if we actually used the skip index to further filter down granules. I don't want to add the skip index if it is only considered during planning. The new query_log table should have an array column where we keep all the skip indexes that were used during the query. I'm grabbing the index name from the index condition type, and I hope, because I'm not sure, that this should match the name we use for the data_skipping_indexes.name column.
I borrowed heavily from the way that we track projections and views, hence the new method, and array type column.
My hope is that this will provide another way to troubleshoot ClickHouse queries and index utilization.
Version info
26.4.1.346