I have created a table in mysql database like below
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`email` varchar(200) NOT NULL,
`address` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
And, inserted 2 rows of data in above table
INSERT INTO `users` (`id`, `email`, `address`) VALUES (NULL, '[email protected]', 'short address');
INSERT INTO `users` (`id`, `email`, `address`) VALUES (NULL, '[email protected]', 'this is a long address');
And, if I check the data in the table, it will show like this
id email address
-------------------------------------
1 [email protected] short address
2 [email protected] this is a long address
Now, I want to know how much disk space occupied by this table (row wise).
So, I need something like below (X,Y are just for illustration purpose, there I need actual values)
id email address row size
----------------------------------------------------------
1 [email protected] short address X bytes
2 [email protected] this is a long address Y bytes
question from:
https://stackoverflow.com/questions/65880449/how-to-calculate-the-disk-spacememory-in-filesystem-taken-for-storing-a-mysql 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…