Get table or DB size im Megabyte

Sometimes it is really useful to know how large a certain database table has become. With the following SQL statement you get a list of all tables of the currently connected database with their rounded size in MB:

This query selects all tables from all connected databases. If you want to select a certain one, you can add a where-clause like that:

And if you need only the size of a single table, you can take this where clause:

And if you need the all over size of your database, you can use the following query:

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.