[postgis-users] geocoding is very slow

Shawn Peterson shawnnpeterson at gmail.com
Mon Apr 22 11:05:14 PDT 2013


I have successfully installed postgresq and postgis. I tried the examples
(addresses in MA) from http://postgis.refractions.net/docs/Geocode.html and
the speed seems fine. However, when I tested it on addresses from CA, it is
extremely slow:

(~ 2 min 20 sec)
SELECT g.rating, ST_Y(g.geomout) As lat, ST_X(g.geomout) As lng,
(addy).address As stno, (addy).streetname As street,
(addy).streettypeabbrev As styp, (addy).location As city,
(addy).stateabbrev As st,(addy).zip
FROM geocode('*7788 Regents Road, San Diego, CA 92122*') As g;

(~ 2 min 40 sec)
SELECT g.rating, ST_Y(g.geomout) As lat, ST_X(g.geomout) As lng,
(addy).address As stno, (addy).streetname As street,
(addy).streettypeabbrev As styp, (addy).location As city,
(addy).stateabbrev As st,(addy).zip
FROM geocode('*675 Westwood Plaza, Los Angeles, CA 90024*') As g;

My goal is to do bulk geocoding. With the current speed I would have to
give up postgis. Can anyone help? Any input is appreciated!

P.S.: Here is some information for my system:
CPU: Intel Xeon 2.67GHZ
postgresql: 9.2.4
postgis: 2.0.4SVN

I've tried to adjust some parameters in postgresql.conf, but it's still as
slow as with default parameters:
shared_buffers = 500MB
work_mem = 16MB
maintenance_work_mem = 16MB
wal_buffers = 1MB
checkpoint_segments = 6
seq_page_cost = 1.0
random_page_cost = 2.0
join_collapse_limit = 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130422/85117c07/attachment.html>


More information about the postgis-users mailing list