-
Notifications
You must be signed in to change notification settings - Fork 606
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
Make more simple incremental update #944
Merged
TomPohys
merged 13 commits into
openmaptiles:master
from
frodrigo:simple_incremental_update
Aug 28, 2020
Merged
Make more simple incremental update #944
TomPohys
merged 13 commits into
openmaptiles:master
from
frodrigo:simple_incremental_update
Aug 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Results evaluating commit 73ce993 (merged with base 10efc29 as bb878a6). See run details. PostgreSQL DB size in MB: 2665 ⇒ 2664 (-0.0% change)
expand for details...
|
a1fe158
to
3b99e38
Compare
a022f1b
to
0228fb8
Compare
This was referenced Jul 23, 2020
0228fb8
to
be952ca
Compare
be952ca
to
470aa1f
Compare
Benchmark on Wales extract. Using same extract date and same update range (20 daily updates). Master
This PR
Update are 8.3% faster. |
TomPohys
approved these changes
Aug 10, 2020
TomPohys
pushed a commit
that referenced
this pull request
Aug 30, 2020
Replacing update on the whole table with an update only on changed rows. The goal is to update more quickly by just updating the changing content. The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) to ensure only update when changed. It requires one more trigger and a table to store changed osm_id. The UPDATE is keep in a function to be reusable for initial setup and trigger update. It is a based on the already merged #944 It is a separated PR as less obvious than previous. It replaces the reset of the `rank` field to NULL by missing value resulting of `LEFT JOIN`. It avoid triggering a new update on the table by reset the value then re-seting it to initial or new value. It addresses #814. Thanks @frodrigo
TomPohys
pushed a commit
that referenced
this pull request
Aug 30, 2020
Replacing update on the whole table with an update only on changed rows. The goal is to update more quickly by just updating the changing content. The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) to ensure only update when changed. It requires one more trigger and a table to store changed osm_id. The UPDATE is keep in a function to be reusable for initial setup and trigger update. It is a based on the already merged #944 It is a separated PR as less obvious than previous. It replaces the reset of the `rank` field to NULL by missing value resulting of `LEFT JOIN`. It avoid triggering a new update on the table by reset the value then re-seting it to initial or new value. It addresses #814. Thanks @frodrigo
lazaa32
added a commit
to maptiler/openmaptiles
that referenced
this pull request
Dec 8, 2020
Bug introduced in openmaptiles#944. Missing exclamation mark in not equal operator caused that tags were not updated thus there were missing `name_int`, `name:latin` and `name:nonlatin`.
TomPohys
pushed a commit
that referenced
this pull request
Dec 8, 2020
Bug introduced in #944. Missing exclamation mark in not equal operator caused that tags were not updated thus there were missing `name_int`, `name:latin` and `name:nonlatin`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replacing update on the whole table with an update only on changed rows.
The goal is to update more quickly by just updating the changing content.
The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) en ensure only update when changed.
It requires one more trigger and a table to store changed osm_id.
The UPDATE is keep in a function to be reusable for initial setup and trigger update.
I try many code layout before done it in this way with the goal to keep the code for initial pass and for update. It should have low impact on initial data load. Better performance for row update can be achieve with BEFORE UPDATE, but require to duplicate the logic.
It is not based on the already merged #896 because calling and update within a function for each updated row was not efficient for larger table (like housenumber).
It addresses #814.