【问题标题】:DataGrip: How to get database and table size for MySQL database?DataGrip:如何获取 MySQL 数据库的数据库和表大小?
【发布时间】:2020-09-10 23:11:33
【问题描述】:

使用 PhyMyAdmin 已有十多年了,我并没有研究 datagrip。我找不到的是关于数据库和表大小的统计信息。大小、行数(概览)、索引大小(以字节为单位)等等。

在 datagrip 中哪里可以找到数据统计信息?

【问题讨论】:

    标签: datagrip


    【解决方案1】:

    好像还没有这个功能。

    对于那些从谷歌来的人,你可以尝试使用 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?

    【讨论】:

      【解决方案2】:

      表,现在不可能了,请关注并点赞:https://youtrack.jetbrains.com/issue/DBE-4281

      对于数据库,DataGrip 的跟踪器中甚至没有功能请求。请添加一个新的。

      【讨论】:

      • 太棒了!这么专业的工具,却缺少这样的基本功能。
      猜你喜欢
      • 2021-04-05
      • 2010-12-16
      • 2013-01-20
      • 2015-02-24
      • 1970-01-01
      • 2018-02-24
      相关资源
      最近更新 更多