Navigate to the database in the Schemas pane.| Database Name | Size in Bytes | Size (Formatted) |Īnother way of finding the database size is to use the MySQL Workbench GUI. Here’s an example of rewriting the previous example to use the FORMAT_BYTES() function: SELECTįORMAT_BYTES(SUM(data_length + index_length)) 'Size (Formatted)' The converted value will depend on the size of the value (so the result could be in bytes, KiB (kibibytes), MiB (mebibytes), GiB (gibibytes), TiB (tebibytes), PiB (pebibytes), or EiB (exbibytes). This function takes a value, converts it to human-readable format and returns a string consisting of a value and a units indicator. You can use the FORMAT_BYTES() function to save yourself converting the size into mebibytes, kibibytes, or whatever. Simply add a WHERE clause with the name of the database: SELECT Of course, you can always narrow it down to a specific database if you need to. In this example I’ve listed the size in bytes and in mebibytes (MiB), but you can choose how you want to present it. | Database Name | Size in Bytes | Size in MiB | ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) 'Size in MiB' SUM(data_length + index_length) 'Size in Bytes', Here’s an example of finding the size of each database by running a query against the information_schema.tables table: SELECT This article provides a quick overview of both methods. You can also use the MySQL Workbench GUI to find details about the database (including its size). You can use the information in this table to find the size of a given database or all databases on the server. This table includes information about the data length, index length, as well as other details such as collation, creation time, etc. In MySQL, you can query the information_schema.tables table to return information about the tables in a database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |