Nominatim geocoding slow performance on planet dataset #3644
-
We have the entire planet dataset loaded and queries are taking 2-5minutes. I have researched all the nominatim repos issues and comments but I think I still need help. We are running nominatim-docker 4.2 with postgres 14.4. Any advice is greatly appreciated! I ran an ANALYZE on the Nominatim DB with no improvement. I then did a REINDEX which improved the query time by maybe 20% (5min to 3min). All nominatim tables appear to be using an index. The following postgres settings have been modified and tested without much change: primary: Below is an EXPLAIN ANALYZE of the SQL query I saw from running: nominatim=# EXPLAIN ANALYZE SELECT Limit (cost=10912961.95..10912962.00 rows=20 width=26) (actual time=102470.844..102484.958 rows=20 loops=1) Server disk performance is: I have no name!@nominatim-postgresql-0:/tmp$ time dd if=/tmp/test1.img of=/dev/null bs=8k |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Make sure you have parallel execution disabled ( Other than that, the usual advice is to update to the latest version 4.5. You can do that without a reimport, just follow the migration hints in the guide Newer PostgreSQL versions are faster as well but you will need to reimport to get to those. |
Beta Was this translation helpful? Give feedback.
-
There were a lot of missing indexes, found the cli troubleshooting command on a blog and it returned this: root@nominatim-6d96b45d5f-4pbpq:/nominatim# /usr/local/bin/nominatim admin --check-database Wikipedia/Wikidata importance tables missing. Checking indexing status ... OK
Checking that all database indexes are valid ... OK So ran the recommended commands: nominatim import --continue db-postprocess time curl -k "https://nominatim.cluster.local/?q=oakland&format=geojson" That seems to have fixed it. |
Beta Was this translation helpful? Give feedback.
There were a lot of missing indexes, found the cli troubleshooting command on a blog and it returned this:
root@nominatim-6d96b45d5f-4pbpq:/nominatim# /usr/local/bin/nominatim admin --check-database
2025-01-28 17:29:44: Using project directory: /nominatim
2025-01-28 17:29:44: Checking database
Checking database connection ... OK
Checking for placex table ... OK
Checking for placex content ... OK
Checking that tokenizer works ... OK
Checking for wikipedia/wikidata data ... WARNING
Wikipedia/Wikidata importance tables missing.
Quality of search results may be degraded. Reverse geocoding is unaffected.
See https://nominatim.org/release-docs/latest/admin/Import/#wikipediawikidata-rankings
Che…