[OSM-dev] Slow Osmosis

Brett Henderson brett at bretth.com
Mon Dec 1 09:08:42 GMT 2008


Whenever I have seen that error in the past it has been because I have 
data in the tables already.  Changing table types shouldn't have any 
effect on duplicate key checks.  It'd be worth double checking to make 
absolutely sure you have no data in the tables already.

Andreas Kalsch wrote:
> 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
>>
>>
>>
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev





More information about the dev mailing list