Thursday, January 13, 2011

Get a perfect Execution time of each query in MySQL

coming soon

Query to get size of Index,Data in mysql

Hi,

SELECT table_schema AS DatabaseName,
TABLE_NAME AS TableName,
CONCAT( ROUND( data_length / ( 1024 *1024 ) , 2 ) , ' MB' ) data_length,
CONCAT( ROUND( index_length / ( 1024 *1024 ) , 2 ) , ' MB' ) index_length,
CONCAT( ROUND( ROUND( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'MB' ) total_size_table
FROM information_schema.TABLES
ORDER BY data_length DESC;

T n R
Kamesh Shah