published by whitemice on Thu, 04/18/2019 - 14:30
This is a query to report the number of rows and the estimated size of all the tables in a MySQL database:
SELECT
table_name,
table_rows,
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS mb_size
FROM information_schema.tables
WHERE table_schema = 'maindb;
Results look like:
published by whitemice on Wed, 01/09/2013 - 00:00
One of the key steps for performing tuning a database is to test indexing strategies and their effect on performance. It is a series of:
- Drop the indexes
- Create new indexes
- Update statistics
- EXPLAIN the important queries.
Rinse and repeat.
published by whitemice on Tue, 02/07/2012 - 06:29
Yesterday I posted about how to identify the hottest table in a PostgreSQL database. Pretty much the same functionality is available for administrators of Informix databases as well; this kind of information is found in the sysmaster database which is the database engine's own database.