How can I display table size with PhpStorm Database tool?

Viewed 255

I connect to MariaDB database via PhpStorm. And I want to see table sizes.

Is it even possible ?

1 Answers

AFAIK PhpStorm and DataGrip do not have such an option.

https://youtrack.jetbrains.com/issue/DBE-4281 -- this seems to be the right ticket for this (to show the physical table size in the View | Quick Documentation popup when invoked on the specific table). Watch it (star/vote/comment) to get notified with any progress.


Right now you can see such info using raw SQL queries.

For example (see #6 taken from https://www.2daygeek.com/check-mysql-mariadb-database-table-size-in-linux/):

SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.TABLES
WHERE table_schema = "testdb"
ORDER BY (data_length + index_length) DESC;

Just change the database name from testdb to your database name.

Related