[OSM-dev] Slow Osmosis
Andreas Kalsch
andreaskalsch at gmx.de
Sun Nov 30 20:38:50 GMT 2008
Yes I drop the database completely - part of my shell script:
echo 'Create database, create tables ..'
mysql -u $mysql_user -p$mysql_pw -e "DROP DATABASE IF EXISTS
$db_name;CREATE DATABASE $db_name DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;"
date
mysql -u $mysql_user -D $db_name -p$mysql_pw <
jobs/osm_schema_latest_optimized0.sql
echo 'Write to database ..'
osmosis/bin/osmosis --read-xml file=$uncompressedFile --write-mysql
host=localhost database=$db_name user=$mysql_user password=$mysql_pw
validateSchemaVersion=no
mysql -u $mysql_user -D $db_name -p$mysql_pw <
jobs/osm_schema_latest_optimized1.sql
date
I have split up the sql script in two parts - 1st to create table just
with primary keys on auto_increment fields, 2nd to alter the populated
tables.
Best,
Andi
Joachim Zobel schrieb:
> Am Sonntag, den 30.11.2008, 15:38 +0100 schrieb Andreas Kalsch:
>
>> com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
>> Duplicate entry '1' for key 1
>>
>
> Did you start with empty tables? This looks like remains from a
> cancelled previous run.
>
> Sincerely,
> Joachim
>
>
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osm_schema_latest_optimized0.sql
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081130/e657039c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osm_schema_latest_optimized1.sql
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081130/e657039c/attachment-0001.ksh>
More information about the dev
mailing list