[OSM-dev] How do I build the latest db schema?
Tom Hughes
tom at compton.nu
Fri Jul 6 09:29:00 BST 2007
In message <468DF962.4020003 at bretth.com>
Brett Henderson <brett at bretth.com> wrote:
> It took a total of 3 hours 45 minutes. Indexing appears to be a huge
> overhead, I suspect that finding a way of disabling indexes would result
> in large savings, it's heavily io bound during node creation
> particularly at the end. This is all on an Athlon 64 3800+ with
> everything running off a Seagate 160GB SATA drive.
Lots of hints on insert performance can be found at:
http://dev.mysql.com/doc/refman/5.1/en/insert-speed.html
For the MyISAM tables doing "ALTER TABLE DISABLE KEYS" before the
inserts and "ALTER TABLE ENABLE KEYS" after will make it update all
the indexes at the end.
If you're not already doing it, adding the rows in batches rather
than singly might help as well, as might locking the tables (for
MyISAM tables) and using transactions (for InnoDB tables).
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list