Forked from sanchezzzhak/clickhouse-get-tables-size.sql
          
        
    
          Created
          April 15, 2022 06:32 
        
      - 
      
- 
        Save Gorilaz/c3c69b66b1563b255d4f28bcf66df23d to your computer and use it in GitHub Desktop. 
    clickhouse get tables size 
  
        
  
    
      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
    
  
  
    
  | SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment