Thanks for the invitation. I think that indexing the table cannot be based entirely on the storage size occupied by the table structure, as it will also increase the storage size. If you want to know the space occupied by each table in the Mysql database and the number of rows recorded in the table, you can open the information_schema database of mysql. There is a Tables table in this library. The main fields of this table are: TABLE_SCHEMA: database name TABLE_NAME: table name ENGINE: storage engine used TABLES_ROWS: number of records DATA_LENGTH: data size INDEX_LENGTH: index size So to know the size of the space occupied by a table, it is equivalent to data size + index size.
Thanks for the invitation. I think that indexing the table cannot be based entirely on the storage size occupied by the table structure, as it will also increase the storage size.
If you want to know the space occupied by each table in the Mysql database and the number of rows recorded in the table, you can open the information_schema database of mysql. There is a Tables table in this library. The main fields of this table are:
TABLE_SCHEMA: database name
TABLE_NAME: table name
ENGINE: storage engine used
TABLES_ROWS: number of records
DATA_LENGTH: data size
INDEX_LENGTH: index size
So to know the size of the space occupied by a table, it is equivalent to data size + index size.