diff options
author | Yorhel <git@yorhel.nl> | 2009-11-29 11:51:21 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-29 11:51:21 +0100 |
commit | be023476e67dc76a5fb1344af5b5cb9244d992e7 (patch) | |
tree | 88c8cbfad23485780f809bd8ca2cf513224074fa /lib | |
parent | bbfc0bb866b2ad327eb25a97d3624b9eb3a7631b (diff) |
SQL: Rewrote tag_vn_calc() to use a WITH RECURSIVE .. SELECT query
This is more efficient, and doesn't require the tag_tree() or
tag_vn_childs() stored procedures. Does require PostgreSQL 8.4+
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Multi/Maintenance.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm index 0ea7ef29..b952c490 100644 --- a/lib/Multi/Maintenance.pm +++ b/lib/Multi/Maintenance.pm @@ -99,20 +99,20 @@ sub log_stats { # num, res, action, time sub vncache { - # this takes about 40s to complete. We really need to search for an alternative + # this takes about 50s to complete. We really need to search for an alternative # method of keeping the c_* columns in the vn table up-to-date. $_[KERNEL]->post(pg => do => 'SELECT update_vncache(0)', undef, 'log_stats', 'vncache'); } sub tagcache { - # takes about 18 seconds max. ouch, but still kind-of acceptable + # takes about 2 seconds max, still OK $_[KERNEL]->post(pg => do => 'SELECT tag_vn_calc()', undef, 'log_stats', 'tagcache'); } sub vnpopularity { - # still takes at most 2 seconds. let's hope that doesn't increase... + # still takes at most 3 seconds. let's hope that doesn't increase... $_[KERNEL]->post(pg => do => 'SELECT update_vnpopularity()', undef, 'log_stats', 'vnpopularity'); } |