zoukankan      html  css  js  c++  java
  • MySQL——查看数据库大小

    前言

    为了计算一些后面的扩展,所以看下当前业务数据的存储

    步骤

    所有的信息都存放在information_schema这个库里面,我们可以通过查询这个库中的数据来找到我们需要的数据。

    查看所有库的数据和索引大小

    select table_schema, concat(truncate(sum(data_length)/1024/1024/1024,2),' GB') as data_size,
    concat(truncate(sum(index_length)/1024/1024/1024,2),'GB') as index_size
    from information_schema.tables
    group by table_schema
    order by data_length desc;
    
  • 相关阅读:
    券商
    养生之道
    房产买卖
    货币常识
    虚拟币
    其他开源项目
    Shiro
    文件上传插件
    JAVA常见问题
    如何写好PPT
  • 原文地址:https://www.cnblogs.com/wangyang0210/p/13385892.html
Copyright © 2011-2022 走看看