December 21st, 1999, 07:33 AM
I am developing a large MySQL database consisting of about 18 tables. It's a backend for a website & we charge our clients per megabyte per month. Therefore I need to know how much disk space the database is using.
I went to the /data/<database name> dir & found all of the files, which is fine. One table consists only of two columns, both of which are MEDIUMINT. There are 69 rows in this table. Yet for some reason it's taking up 1342992 bytes! All the other tables are far smaller, so does anyone know why this one is so memory hungary?
December 21st, 1999, 09:42 AM
Not a clue why it's doing that. Try dumping the table using mysqldump, then drop it from the database and restore it from the dump. That may clear it up.
December 22nd, 1999, 03:32 AM
Yup, that did the trick.
The ISD file is now 483 bytes, so it's quite a reduction. It makes me wonder if doing a mysqldump and reload occasionaly is a good habit to get into?
December 22nd, 1999, 07:49 AM
I don't think that's necessary. Have you had a lot of data shuffle in and out of that table? If so, it's possible that an OPTIMIZE might have cleared it up. Dang, wish I'd thought of that sooner.