-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using osm2pgsql flex output #1
Comments
@joto Thank you for this, looks to be a huge improvement. I will implement this when I do the next database update. |
@joto This works great. To be able to update the database, I'd add |
@loganwilliams Yes. If you have version 1.9.0 (or above) of osm2pgsql you don't even need any extra parameters to the |
Hm, I'm seeing significantly degraded performance when testing queries against the planet_osm table that this produces vs. the planet_osm view that I was using in earlier versions. I wonder why this could be? Query planner: old:
new:
|
It is difficult to see from that EXPLAIN output alone what is happening here, without having access to the database. Looks like maybe some of the indexes behave differently for some reason or another. I think the way forward would probably be to first go back to the original database layout with the three tables but use the flex output to generate it. And keep the original VIEW. That would already be a simplification compared to the situation before. Ideally the tables would then look the same and behave the same. Once that works reliably you can introduce more changes. But it is all a question of what kinds of queries you are doing exactly and what you want the database to do at that point. |
With modern osm2pgsql you don't need all the postprocessing SQL files. All that is done in there can be done by creating a config file for osm2pgsql that creates the data in the database in the format you need from the beginning. This is not only easier, it should also be a lot faster.
Here is a config file that should get you one table called
planet_osm
with everything in it very similar to what you had before:To import use
As an added benefit, you can use osm2pgsql to keep this database up-to-date, something that wasn't possible before due to the postprocessing.
The text was updated successfully, but these errors were encountered: