I have a table :
create table a(a1 int, a2 char(10),a3 float);
I can manually count the number of bytes allocated for this table a. But, how to find its size in mysql with some queries???
I have a table :
create table a(a1 int, a2 char(10),a3 float);
I can manually count the number of bytes allocated for this table a. But, how to find its size in mysql with some queries???
IF you are looking for physical table size of table a
SELECT
TABLE_NAME AS `Table`,
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
FROM
information_schema.TABLES
WHERE
TABLE_SCHEMA = '<schema>'
AND
TABLE_NAME = 'a'
ORDER BY
(DATA_LENGTH + INDEX_LENGTH)
DESC;