diff options
author | Yorhel <git@yorhel.nl> | 2019-10-07 11:07:57 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-10-07 11:11:49 +0200 |
commit | 65ed955890c7ee7250a2bce4467c8c092c1bbbbe (patch) | |
tree | 43dda83ad493e4350dff6af301f5c1a5b6b779aa /util/updates | |
parent | ba02e35cea8f2f25ab0ed1a4fccc8983435f9671 (diff) |
SQL: Perform incremental updates on tags_vn_inherit when tags are modified
This has some limitations:
- tags.c_items is not updated, so that may be out of sync.
(The UPDATE takes about 400ms, so doing that more regularly from
Multi::Maintenance should be a viable option)
- When the hidden flag of a VN is changed, the tags will also be out of
sync.
- I don't see a way to do fast incremental updates when tag entries
themselves are changed, e.g. to handle changes in the tag tree or
searchable flag
Diffstat (limited to 'util/updates')
-rw-r--r-- | util/updates/update_20191007.sql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/updates/update_20191007.sql b/util/updates/update_20191007.sql index 9d556478..291e94f6 100644 --- a/util/updates/update_20191007.sql +++ b/util/updates/update_20191007.sql @@ -2,6 +2,8 @@ ALTER TABLE tags_vn_inherit DROP COLUMN users; ALTER TABLE traits_chars DROP CONSTRAINT traits_chars_pkey; +DROP FUNCTION tag_vn_calc(); + \i util/sql/func.sql -SELECT tag_vn_calc(); +SELECT tag_vn_calc(NULL); SELECT traits_chars_calc(); |