path: root/lib/VNDB/Handler/
diff options
authorYorhel <>2015-10-21 16:55:52 +0200
committerYorhel <>2015-10-21 16:59:18 +0200
commitd5456b8ed5952b9fa061f0de536fab572c95016a (patch)
treebf70e1739ea47b0cd364fdf1fa60d4867795ff5a /lib/VNDB/Handler/
parent08a0d819efd244c8b3dacfd810b7322ad8df73fb (diff)
Improve SQL in dbRevisionGet()
Two main improvements: - Filtering on (non)hidden items now doesn't join any of the item tables, instead it looks up the latest revision from the changes table itself, using the index on (type,itemid,rev). It's still not super fast, but a pretty large improvement nonetheless. - The item titles/names are obtained in a separate query. I tried to modify the main query in various ways, but couldn't make it as fast as I'd have liked. I also removed the 'what' flag while I was at it, all uses of the method request all information anyway.
Diffstat (limited to 'lib/VNDB/Handler/')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/ b/lib/VNDB/Handler/
index 491c573b..c0836f97 100644
--- a/lib/VNDB/Handler/
+++ b/lib/VNDB/Handler/
@@ -125,7 +125,7 @@ sub userpage {
if($u->{c_changes}) {
- my $list = $self->dbRevisionGet(what => 'item user', uid => $uid, results => 5);
+ my $list = $self->dbRevisionGet(uid => $uid, results => 5);
h1 class => 'boxtitle';
a href => "/u$uid/hist", mt '_userpage_changes';