I want to find the space occupied by the records in database. I have 2000 records. I need to find how much space occupied by empid 4 in the database in mySQL.
Please let me know the query in mySQL.
I want to find the space occupied by the records in database. I have 2000 records. I need to find how much space occupied by empid 4 in the database in mySQL.
Please let me know the query in mySQL.
SHOW TABLE STATUS is the command you're looking for:
SHOW TABLE STATUS IN your_database LIKE 'yourtable';
The metric you're looking for may be either Data_length
or Avg_row_length
.