[postgis-users] Geocoder (from extras)

Stephen Frost sfrost at snowman.net
Fri May 6 19:36:23 PDT 2011


* Johnathan Leppert (johnathan.leppert at gmail.com) wrote:
> Ok, I have it working, but it's very very slow. It takes about two seconds
> to geocode a single record. This isn't very realistic for large datasets.
> Anyone have any ideas on possible optimization? It appears to have created
> proper indexes on all the tables.

Yeah, there's a few things I've been working on.  For one, a lot of the
time is spent planning that massive query at the heart of the geocoding,
when it really doesn't need to be re-planned for every query.  It's done
the way it is currently because the tables are partitioned up by state.
I've got someone working on simply splitting that query up to be 53 (or
however many...) queries, one for each state/territory, which will allow
them to be planned once and then the plans re-used inside the same
session.  That should improve things.

I've also been looking into using trigrams for things instead of the
current indexes..  I think they're perform better with regard to speed,
just need to make sure it still returns good results, etc..

I'm very interested in anyone else working on this and any suggestions
people have for how to improve it..  I've not been able to work on it
much recently and while I've tried to delegate it to others, it's a
pretty complex system which is, in particular, hard to test well..

	Thanks,

		Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110506/62e0f2eb/attachment.pgp>


More information about the postgis-users mailing list