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

表信息 #27

Open
zjp-CN opened this issue Feb 13, 2023 · 0 comments
Open

表信息 #27

zjp-CN opened this issue Feb 13, 2023 · 0 comments

Comments

@zjp-CN
Copy link
Owner

zjp-CN commented Feb 13, 2023

截止 2022-10-21

# src: https://gist.github.com/sanchezzzhak/511fd140e8809857f8f1d84ddb937015?permalink_comment_id=3159885#gistcomment-3159885
select concat(database, '.', table)                         as table,
       formatReadableSize(sum(bytes))                       as size,
       sum(rows)                                            as rows,
       max(modification_time)                               as latest_modification,
       sum(bytes)                                           as bytes_size,
       any(engine)                                          as engine,
       formatReadableSize(sum(primary_key_bytes_in_memory)) as primary_keys_size
from system.parts
where active
group by database, table
order by bytes_size desc;
┌─table──────────────────────────┬─size───────┬───────rows─┬─latest_modification─┬─bytes_size─┬─engine─────────────┬─primary_keys_size─┐ 
│ system.asynchronous_metric_log4.25 GiB   │ 24441795022023-02-13 20:18:274560588878 │ MergeTree          │ 1.71 MiB          │ 
│ system.trace_log2.71 GiB   │  1715335592023-02-13 20:18:232904611566 │ MergeTree          │ 123.02 KiB        │ 
│ system.metric_log_0783.74 MiB │   108963682022-08-21 02:03:52821812419 │ MergeTree          │ 16.40 KiB         │ 
│ rustdx.factor443.94 MiB │   124552682023-02-13 20:07:09465499910 │ ReplacingMergeTree │ 11.92 KiB         │ 
│ system.metric_log438.22 MiB │    59270262023-02-13 20:18:25459510233 │ MergeTree          │ 9.96 KiB          │ 
│ rustdx.qfq390.67 MiB │   124552682022-10-21 15:16:01409646375 │ MergeTree          │ 11.91 KiB         │ 
│ system.query_log_0471.58 KiB │       34102022-08-16 15:35:54482903 │ MergeTree          │ 48.00 B           │ 
│ system.query_thread_log_0470.06 KiB │       26292022-08-16 15:34:05481338 │ MergeTree          │ 48.00 B           │ 
│ system.query_log216.86 KiB │       13482023-02-13 20:18:21222065 │ MergeTree          │ 48.00 B           │ 
│ system.query_thread_log207.60 KiB │       10442023-02-13 20:18:22212579 │ MergeTree          │ 48.00 B           │ 
│ system.part_log142.46 KiB │       39022023-02-13 20:16:16145874 │ MergeTree          │ 120.00 B          │ 
│ rustdx.qfq_x57.06 KiB  │       48312022-10-21 15:15:3658433 │ MergeTree          │ 20.00 B           │ 
│ system.session_log31.49 KiB  │       11862022-08-16 15:35:5232248 │ MergeTree          │ 48.00 B           │ 
│ rustdx.daily1.48 KiB   │        2182022-10-21 16:06:041519 │ ReplacingMergeTree │ 20.00 B           │ 
│ rustdx.daily_tmp579.00 B   │         962022-10-21 15:16:02579 │ ReplacingMergeTree │ 20.00 B           │ 
│ rustdx.daily_prepare221.00 B   │          12022-10-21 15:16:02221 │ ReplacingMergeTree │ 20.00 B           │ 
│ default.test_insert99.00 B    │          12022-07-02 23:31:3599 │ ReplacingMergeTree │ 16.00 B           │ 
└────────────────────────────────┴────────────┴────────────┴─────────────────────┴────────────┴────────────────────┴───────────────────┘ 
select * from rustdx.factor ORDER BY date DESC LIMIT 3;
┌───────date─┬─code───┬───open─┬───high─┬───low─┬──close─┬────amount─┬───vol─┬─preclose─┬─────────────factor─┐
│ 2022-10-21688275206.64214.96206.6213.6437864850017857206.670.7197261851324536 │
│ 2022-10-216882733636.7535.1835.3527051041473336.220.883215281359019 │
│ 2022-10-2168827222.2922.8221.7722.278030155359122.210.493877325837467 │
└────────────┴────────┴────────┴────────┴───────┴────────┴───────────┴───────┴──────────┴────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant