runeveryday — 2010-01-23T23:03:18-05:00 — #1
when i used phpmyadmin to backup my database,i found in phpmyadmin,the dababase's size is 8.4 MB.but i backed it to the local,its size is 10 MB,why they are different ?
disgracian — 2010-01-24T04:42:28-05:00 — #2
I don't know about MySQL, but some database systems will pre-allocate hard drive space based on growth rules.
spacephoenix — 2010-01-24T01:37:29-05:00 — #3
The difference will probably be the size of the index for the database.
runeveryday — 2010-01-24T03:09:26-05:00 — #4
i can't understand what you have said.
spacephoenix — 2010-01-24T03:54:47-05:00 — #5
Run this query, it should explain it a bit better.
SELECT concat( table_schema, '.', table_name ) table_name, concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length, concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length, concat( round( round( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'M' ) total_size
WHERE table_schema = '#database_name#'
Substitute #database_name# for the name of whatever database you want to find out how big it is (the sizes given are in MB).