Hi ,

We are using Nominatim with following configs for geocoding (getting lat and lon) Nominatim Version 2.4.0 16 core CPUS, 122GB RAM 320GB SSD HD

And our postgresql.conf looks like following

shared_buffers = 1GB # min 128kB maintenance_work_mem = 10GB # min 1MB work_mem = 50MB # min 64kB maintenance_work_mem = 10GB # min 1MB effective_cache_size = 24GB synchronous_commit = off # synchronization level; checkpoint_segments = 100 # in logfile segments, min 1, 16MB each checkpoint_timeout = 10min # range 30s-1h checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0

We are seeing following queries taking time (almost always> 5 seconds) in postgres logs for geocode http://nominatim.local.com/nominatim/search.php?format=json&limit=1&q=322+West+Street%2CCarlisle%2CMassachusetts%2C01741%2CUnited+States

LOG: duration: 19915.484 ms statement: select place_id, (select count(*) from (select unnest(ARRAY[4523464,5730972,36867388]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[2832006] and array_cat(nameaddress_vector,ARRAY[]::integer[]) @> ARRAY[15678054,348921,362979,36867389] and country_code = 'us' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 2

http://nominatim.local.com/nominatim/search.php?format=json&limit=1&q=106+Winchester+Street+%232%2CBrookline%2CMassachusetts%2C02446%2CUnited+States

LOG: duration: 13518.676 ms statement: select place_id, (select count(*) from (select unnest(ARRAY[6122619,5730972,18878827]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[2294177] and array_cat(nameaddress_vector,ARRAY[]::integer[]) @> ARRAY[1997025,53652,362979,18878828] and country_code = 'us' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 2

Can someone suggest what are we missing here? Anyways to improve like creating indexes or changing postgres configs?

Thanks.

asked 15 Nov '16, 07:46

aaphadke's gravatar image

aaphadke
11112
accept rate: 0%


permanent link

answered 15 Nov '16, 10:57

mtmail's gravatar image

mtmail
2.6k644
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×550
×144
×115
×29

question asked: 15 Nov '16, 07:46

question was seen: 1,907 times

last updated: 15 Nov '16, 10:57

powered by OSQA