[OSM-talk] Announcing name searches for OSM
David Earl
david at frankieandshadow.com
Tue May 8 11:54:11 BST 2007
> -----Original Message-----
> From: Hakan Tandogan [mailto:hakan at gurkensalat.com]
> Sent: 08 May 2007 11:41
> To: David Earl
> Cc: OSM
> Subject: Re: [OSM-talk] Announcing name searches for OSM
>
>
> >> Yesterday, I whipped up a perl script that
> >> should populate my own OSM-like database with multiple insert / update
> >> scripts, and it takes ages to process even a smallish area...
> >
> > Indeed. Mine is in PHP and runs for about 10 hours to create the index.
> > Much
> > of the time is spent doing queries to follow the ids from way to segment
>
> Did you create indices on your tables? Adding a simple "primary index" to
> my tables (and using a transaction size of 1000 statements) sped up my
> script from multiple hours to about 5 minutes...
Yes, of course.
At the moment I'm creating the name search tables alongside reading the xml.
It may be much faster if I do one pass to load the xml into the database and
then another to pass over that to create the name search tables. Since it
can run overnight once a week I haven't troubled too much about how slow
this part is - it's end-user lookups at the end which have to be efficient -
but it is somewhat tedious and will only get worse.
David
More information about the talk
mailing list