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

Dashboards: Fix query in Data Analysis dashboard #804

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dashboards/data-analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@
}
},
"queryType": "sql",
"rawSql": "SELECT name,\n engine,\n tables,\n partitions,\n parts,\n formatReadableSize(bytes_on_disk) \"disk_size\",\n col_count,\n total_rows,\n formatReadableSize(data_uncompressed_bytes) as \"uncompressed_size\"\nFROM system.databases db\n LEFT JOIN ( SELECT database,\n uniq(table) \"tables\",\n uniq(table, partition) \"partitions\",\n count() AS parts,\n sum(bytes_on_disk) \"bytes_on_disk\",\n sum(data_compressed_bytes) as \"data_compressed_bytes\",\n sum(rows) as total_rows,\n max(col_count) as \"col_count\"\n FROM system.parts AS parts\n JOIN (SELECT database, count() as col_count\n FROM system.columns\n WHERE database IN (${database}) AND table IN (${table})\n GROUP BY database) as col_stats\n ON parts.database = col_stats.database\n WHERE database IN (${database}) AND active AND table IN (${table})\n GROUP BY database) AS db_stats ON db.name = db_stats.database\nWHERE database IN (${database}) AND lower(name) != 'information_schema'\nORDER BY bytes_on_disk DESC\nLIMIT 10;",
"rawSql": "SELECT name,\n engine,\n tables,\n partitions,\n parts,\n formatReadableSize(bytes_on_disk) \"disk_size\",\n col_count,\n total_rows,\n formatReadableSize(data_uncompressed_bytes) as \"uncompressed_size\"\nFROM system.databases db\n LEFT JOIN ( SELECT database,\n uniq(table) \"tables\",\n uniq(table, partition) \"partitions\",\n count() AS parts,\n sum(bytes_on_disk) \"bytes_on_disk\",\n sum(data_uncompressed_bytes) as \"data_uncompressed_bytes\",\n sum(rows) as total_rows,\n max(col_count) as \"col_count\"\n FROM system.parts AS parts\n JOIN (SELECT database, count() as col_count\n FROM system.columns\n WHERE database IN (${database}) AND table IN (${table})\n GROUP BY database) as col_stats\n ON parts.database = col_stats.database\n WHERE database IN (${database}) AND active AND table IN (${table})\n GROUP BY database) AS db_stats ON db.name = db_stats.database\nWHERE database IN (${database}) AND lower(name) != 'information_schema'\nORDER BY bytes_on_disk DESC\nLIMIT 10;",
"refId": "A"
}
],
Expand Down
Loading