Database size calculation?

前端 未结 3 555
说谎
说谎 2020-12-29 12:43

What is the most accurate way to estimate how big a database would be with the following characteristics:

  • MySQL
  • 1 Table with three columns:
    • i
3条回答
  •  爱一瞬间的悲伤
    2020-12-29 13:15

    If you want to know the current size of a database you can try this:

    SELECT table_schema "Database Name"
         , SUM(data_length + index_length) / (1024 * 1024) "Database Size in MB"
    FROM information_schema.TABLES
    GROUP BY table_schema
    

提交回复
热议问题