On Aug 17, 2007, at 2:07 PM, Davide Alberani wrote: > On Aug 16, Jesper Noehr <[EMAIL PROTECTED]> wrote: > >>> The directory imdbtest (imdbtest is the name of the database I >>> was creating) is just under 200 KB, while the ibdata1 file is >>> 2.4 GB and growing. >> >> hermes:/var/www/DWS/tools# du -sh /var/lib/mysql/imdb_inno/ 3.2G >> /var/lib/mysql/imdb_inno/ > > I see... there is something rotten, in _my_ MySQL. > Using MyISAM I have /var/lib/mysql/imdb/ big as I expect it to be, > but populating a InnoDB database I see that /var/lib/mysql/imdb_inno/ > stays very small while /var/lib/mysql/ibdata1 grows insanely big. > Even if I later DROP the database, ibdata1 doesn't shrink (I've > to stop mysql, remove ibdata1 alongside with ib_logfile0 and > ib_logfile1, > and then restart mysql...)
Yeah, that's a well known "problem". MySQL never removes any data from ibdata1. What you might want to do is set "innodb_file_per_table" in your [mysqld] section of your config file, which will let it fill up individual files like MyISAM does. It's easier to administer, and when you truncate tables, it will actually remove data from the files (.ibd I believe). >> The way I did it was just to do a ALTER TABLE and set the >> ENGINE=InnoDB;. It took a long time to convert but all the indexes >> are there, and it works fine. > > You're cheating! ;-) > I can do that too, and it works (well... I've tested just 2 tables > and the ibdata1 file started to grow, so I'm not that sure that > it works as expected). That is what's supposed to happen. > The real problem is running imdbpy2sql.py with a database set to > use InnoDB: after all the data were processed, it takes forever > (or a good approximation of forever ;-) to build indexes. It *will* take a long time, yes, which is why doing an ALTER TABLE is easier. I just thought perhaps we should give people the choice when they initially install it. It might be a poweruser feature and they can figure it out themselves.. But then again, importing to MyISAM takes a good while too. How long did you let it run for? -- Jesper ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel