Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table function that shows fuse table history and basic statistics #3301

Closed
Tracked by #2946
dantengsky opened this issue Dec 8, 2021 · 0 comments · Fixed by #3302
Closed
Tracked by #2946

table function that shows fuse table history and basic statistics #3301

dantengsky opened this issue Dec 8, 2021 · 0 comments · Fixed by #3302
Labels
C-improvement Category: improvement

Comments

@dantengsky
Copy link
Member

dantengsky commented Dec 8, 2021

introduce table function fuse_history, which shows

  • fuse table history
  • basic statistics for each snapshot

sth like this:

> select * from fuse_history('default', 'test');
+----------------------------------+----------------------------------+---------------+-------------+-----------+--------------------+------------------+
| snapshot_id                      | prev_snapshot_id                 | segment_count | block_count | row_count | uncompressed_bytes | compressed_bytes |
+----------------------------------+----------------------------------+---------------+-------------+-----------+--------------------+------------------+
| b5c164e8a1be4a9588c399eed66e1a69 | 6d3c75712c4f45c3b78345b08dc68da2 |            xx |          xx |       xxx |                xxx |             xxxx |
| 6d3c75712c4f45c3b78345b08dc68da2 | 495a906683fe4bdda2549420a9dc2fc4 |            xx |          xx |   xxxxxxxx|            xxxxxxx |          xxxxxxx |
| 495a906683fe4bdda2549420a9dc2fc4 | eaedc47499d041779e6eaf774c650dca |            xx |          xx |    xxxxxxx|             xxxxxx |           xxxxxx |
| eaedc47499d041779e6eaf774c650dca | 13f6d7099f36453da4c983337810075c |            xx |          xx |      xxxxx|               xxxx |            xxxxx |
| 13f6d7099f36453da4c983337810075c | 1a5d74d4a2a94fc48b997089657232b0 |             x |           x |         x |                 xx |              xxx |
| 1a5d74d4a2a94fc48b997089657232b0 | 419d90b7af854185a2e4f84eeae06a3a |             x |           x |         x |                 xx |              xxx |
| 419d90b7af854185a2e4f84eeae06a3a | NULL                             |             x |           x |         x |                  x |              xxx |
+----------------------------------+----------------------------------+---------------+-------------+-----------+--------------------+------------------+

> select compressed_bytes/block_count as bytes_per_block from fuse_hist('default', 'test') where snapshot_id = 'xxx';

+--------------------+
| bytes_per_block      |
+--------------------+
| 197846.34782608695 |
+--------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-improvement Category: improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant