I have an Amazon r3.large instance I'll use for geocoding. I'm using the TIGER geocoder with and have downloaded two states already. Texas and California, but I'm getting poor results on this. For CA, the average time is around 13s, which is really high considering the specifications of the machine: 15GB of RAM and SSD.


For this address:

84 HARRIET ST San Francisco CA

Coordinates I got are:

37.778199   -122.406455

Geocoding time is:

13.32 s

Current values on postgresql.conf are:


# - Memory -

shared_buffers = 11GB                   # min 128kB
                                        # (change requires restart)
#huge_pages = try                       # on, off, or try
                                        # (change requires restart)
#temp_buffers = 8MB                     # min 800kB
#max_prepared_transactions = 0          # zero disables the feature
                                        # (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
work_mem = 16MB                         # min 64kB
maintenance_work_mem = 128MB            # min 1MB
#autovacuum_work_mem = -1               # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB                  # min 100kB
dynamic_shared_memory_type = posix      # the default is the first option
                                        # supported by the operating system:
                                        #   posix
                                        #   sysv
                                        #   windows
                                        #   mmap
                                        # use none to disable dynamic shared memory


After fixing index:

SELECT install_missing_indexes();
vacuum analyze verbose tiger.addr;
vacuum analyze verbose tiger.edges;
vacuum analyze verbose tiger.faces;
vacuum analyze verbose tiger.featnames;
vacuum analyze verbose tiger.place;
vacuum analyze verbose tiger.cousub;
vacuum analyze verbose tiger.county;
vacuum analyze verbose tiger.state;
vacuum analyze verbose tiger.zip_lookup_base;
vacuum analyze verbose tiger.zip_state;
vacuum analyze verbose tiger.zip_state_loc;

I'm getting 40ms on average.

closed as off-topic by PolyGeo Jul 21 '17 at 2:00

