NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I've been trying to improve reverse geocoding queries speed and during the action I've noticed that many tables are not used in the process. So, hence are the 2 questions:

1) What tables can be safely removed/truncated to minimize disk usage? Of course, it would be great to have possibility to keep the DB up to date (even if i need to truncate aforementioned tables from time to time)

2) Is there any way to speed up Nominatim queries? From what I can see so far:

  • loading indices/tables into system cache (either by pg_prewarm or pgfincore or a separate tool)

  • disable logging of the queries to new_query_log table, i haven't found the config parameter though (hacking PHP code is surely a dirty way). If someone could advise where to find exhaustive list of the configuration options for OSM/Nominatim that'd be great.

  • add more indices? I noticed there was a new index added relatively not long ago that includes only geometry records that needed for reverse geocoding, this way reducing size of the index by a few gigabytes.

  • use persistent connections to postgres (reduces system time).

  • any other ideas???

asked 03 Jun '16, 14:41

Taras%20O's gravatar image

Taras O
36336
accept rate: 0%

edited 03 Jun '16, 14:42

Hello @Taras, Can you describe more detail about loading indices/table into system cache ?

In my case, I need geocoder in my country only and its data is rather small so I think if I can cache main table into memory It will improve performance a lot but I can't find any guidelines about this

(12 Apr '17, 09:49) Bui Khanh
1

Please do not ask or expand questions in answers, either use comments or edit your original question.

(12 Apr '17, 15:03) SimonPoole ♦

@Bui Khanh, yes, basically when you access a file it gets into system cache (or rather part of it that was read), the idea is to determine what files you need (depends on your use case) and put them into cache. For me the tables were:

idx_place_id

idx_placex_geometry

idx_place_addressline_place_id

placex

So, for me finding the tables and reading the files once made the trick. I used pg_relation_filepath() function to determine the files and then used vmtouch tool to put them in memory. I hope this helps!

(13 Nov '18, 21:39) Taras O

Hello, if you want to disable logging to new_query_log
you have to set const_log_db to false,
File: Nominatim/settings/settings.php String: @define('CONST_Log_DB', true); => @define('CONST_Log_DB', false);

permanent link

answered 28 Jun '16, 11:37

Mike%20Sirs's gravatar image

Mike Sirs
262
accept rate: 0%

edited 28 Jun '16, 11:39

Thank you!

(13 Nov '18, 21:39) Taras O

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:

×689
×85
×28
×17
×10

question asked: 03 Jun '16, 14:41

question was seen: 6,465 times

last updated: 13 Nov '18, 21:39

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum