For marketers
who love technology
Home » , » How to know the size (number of row/records) of a mysql database?

How to know the size (number of row/records) of a mysql database?


In this post, I will show you how to know the size (number of row/records) of a MySql database.

I wanted to host an app on heroku. They offer free database for up to 10000 rows. So, I needed to know if my database fits into that limit...


$ mysql -u root -p 

mysql> use my_site_db
mysql> SELECT SUM(TABLE_ROWS)       FROM INFORMATION_SCHEMA.TABLES       WHERE TABLE_SCHEMA = 'my_site_db';
+-----------------+
| SUM(TABLE_ROWS) |
+-----------------+
|            9662 |
+-----------------+
1 row in set (0.03 sec)

My database contains 9662 records.


SHARE

About Gilles

0 comments :

Post a Comment