Commit c7181809 authored by Max Kostikov's avatar Max Kostikov

Fix MySQL performance on categories list build

parent fc658a25
Pipeline #181060 passed with stage
in 2 minutes and 23 seconds
......@@ -71,7 +71,7 @@ function categories_widget($baseurl,$selected = '') {
$item_normal = item_normal();
$terms = array();
$r = q("select distinct(term.term) from term join item on term.oid = item.id
$r = q("SELECT distinct(term.term) FROM term " . (\DBA::$dbtype == 0 ? 'STRAIGHT_JOIN' : 'JOIN') . " item ON term.oid = item.id
where item.uid = %d
and term.uid = item.uid
and term.ttype = %d
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment