Query to get the list of table with number of rows and size of the table


USE INFORMATION_SCHEMA;
SELECT
table_name, table_rows, round((data_length / 1024 / 1024/ 1024),1) “DB Size in GB”
FROM
TABLES
where
table_schema = ‘database_name’
ORDER BY data_length DESC
Use Facebook to Comment on this Post

Advertisements

iowait


How iowait impacts System performance System or any server’s performance heavily depends on IOPS. And if MySql is running on the System, it requires disk of high IOPS. Lots of select queries running simultaneously cause high iowait if disk dont have high IOPS. High iowait means cpu is waiting for I/O access. That increase the…

selecting data from mysql db using regular expression


A regular expression is a powerful way of specifying a pattern for a complex search. Below is a simple example. select email from foo where email REGEXP ‘foo.com$’; In the above example, It will list all the email which ends with foo.com. “$” sign is used to denote the end of the string.