【发布时间】:2020-09-10 23:11:33
【问题描述】:
使用 PhyMyAdmin 已有十多年了,我并没有研究 datagrip。我找不到的是关于数据库和表大小的统计信息。大小、行数(概览)、索引大小(以字节为单位)等等。
在 datagrip 中哪里可以找到数据统计信息?
【问题讨论】:
标签: datagrip
使用 PhyMyAdmin 已有十多年了,我并没有研究 datagrip。我找不到的是关于数据库和表大小的统计信息。大小、行数(概览)、索引大小(以字节为单位)等等。
在 datagrip 中哪里可以找到数据统计信息?
【问题讨论】:
标签: datagrip
好像还没有这个功能。
对于那些从谷歌来的人,你可以尝试使用 SQL 查询:
MySql:
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / (1024 * 1024) "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;
SELECT table_name, round(((data_length + index_length) / (1024*1024)),2) as "size in megs" FROM information_schema.tables WHERE table_schema = "named_db";
PostgreSQL:
SELECT pg_size_pretty( pg_database_size('dbname') );
SELECT pg_size_pretty( pg_total_relation_size('tablename') );
来源:
https://jonathanstreet.com/blog/disk-space-database-table-mysql-postgresql/
How to get size of mysql database?
【讨论】:
表,现在不可能了,请关注并点赞:https://youtrack.jetbrains.com/issue/DBE-4281
对于数据库,DataGrip 的跟踪器中甚至没有功能请求。请添加一个新的。
【讨论】: