如何在我的mysql数据库中获取planet-latest.osm.bz2?

I have an Intel i3-2350M CPU @ 2.30GHz with Windows 7, 64 bit, 4GByte Ram and enough free HD space.

The openstreetmap-file planet-latest.osm.bz2 is very big and compressed. (The version I have is 36 GByte compressed, and I believe it's like 100 GByte uncompressed. I have a mysql-database running, that I installed with XAMPP. (So I have apache and php available, too.)

My questions are:

  1. The OSM-project seems to have switched to postgresql and postgis. Is this really better (===faster) than MySql? (I strongly doubt that.)
  2. Is there a set of commands to get the compressed file into the database? Or would it reduce the risk of failure of the commands if I first decompress it? 2b. Could I discard of all XML-nodes that are not neccessary for the graphical output in the process of importing the data into the database? (With one stroke. :P )
  3. It's possible for me to convert the data to a .csv-file (out of the XML): Would that make it more complacent to get the data into the database?
  4. How long will the machine take? I can't let it run for hours without supervision. (I can break up the big file in smaller files, though I deem this to be error prone and not advisable.)

Greetings John

P.S. I have most if not all standard programs at hand that are linked ont he OSM-wiki. (Though the OSM-wiki is outright deficient and a bit outdated about the currently available tools.)

Open Street Map uses geographic information system features in postgreSQL that aren't available in MySQL. In particular, some of the operations use GIS map-projection features.

Here's a description of the various schemas and their requirements for database server make and model. http://wiki.openstreetmap.org/wiki/Databases#Database_Schemas

Both postgreSQL and MySQL are decently fast technologies on 64 bit platforms. For a database the size of global OSM, your performance will depend on fast storage as well as processing power.

It's hard to give advice about what technology might be faster without knowing a lot more about what you're trying to do. But I can say this: by using the technology created and tested by the open street map team, your nodes-per-month performance will be higher for at least a couple of months -- the months you would spend adapting the data.