system table improvements#79090
Merged
gingerwizard merged 7 commits intoClickHouse:masterfrom Apr 13, 2025
Merged
Conversation
Contributor
Blargian
reviewed
Apr 13, 2025
| SELECT | ||
| hostname() AS host, | ||
| count() | ||
| FROM clusterAllReplicas('default', merge('system', 'query_log*')) |
Member
There was a problem hiding this comment.
This regular expression is incorrect.
It matches query_logggggggggggg and also unquery_log, but not what you thought.
Collaborator
Author
There was a problem hiding this comment.
SELECT
_table,
hostname() AS host,
count()
FROM clusterAllReplicas('default', merge('system', 'query_log*'))
WHERE (event_time >= '2025-04-01 00:00:00') AND (event_time <= '2025-04-12 00:00:00')
GROUP BY
host,
_table
Query id: b7802cc4-d3e0-4043-b7ce-a7f344029ff2
┌─_table──────┬─host──────────────────────────┬─count()─┐
1. │ query_log_1 │ c-ecru-qn-34-server-6em4y4t-0 │ 1507410 │
2. │ query_log_3 │ c-ecru-qn-34-server-s5bnysl-0 │ 1495410 │
3. │ query_log_1 │ c-ecru-qn-34-server-s5bnysl-0 │ 428129 │
4. │ query_log │ c-ecru-qn-34-server-iejrkg0-0 │ 641155 │
5. │ query_log_2 │ c-ecru-qn-34-server-s5bnysl-0 │ 433918 │
6. │ query_log_2 │ c-ecru-qn-34-server-6em4y4t-0 │ 1496004 │
7. │ query_log_1 │ c-ecru-qn-34-server-iejrkg0-0 │ 437132 │
8. │ query_log │ c-ecru-qn-34-server-6em4y4t-0 │ 656029 │
9. │ query_log │ c-ecru-qn-34-server-s5bnysl-0 │ 650543 │
└─────────────┴───────────────────────────────┴─────────┘that matches what i expected
Collaborator
Author
There was a problem hiding this comment.
i can make it '^query_log.*'
Collaborator
Author
There was a problem hiding this comment.
made '^query_log.*'
| SELECT | ||
| _table, | ||
| max(event_time) AS most_recent | ||
| FROM merge('system', 'query_log*') |
Collaborator
Author
There was a problem hiding this comment.
made '^query_log.*'
alexey-milovidov
added a commit
that referenced
this pull request
Apr 13, 2025
Member
|
@gingerwizard, I've corrected the mistake here: 64fab30 |
alexey-milovidov
added a commit
that referenced
this pull request
Apr 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses questions around system table versions as well as querying across nodes @cwurm
Changelog category (leave one):