I spent some time trying to fix query performance with MySQL when building categories list in widget
include/contact_widgets.php
. I found that its optimizer do not respects table mentions order in
JOIN
queries when performs
ORDER BY
so in some cases it dramaticaly increases query run time. But there is a way to fix it using special MySQL specific
STRAIGHT_JOIN
command.
Here is the hack how it can be fixed in Hubzilla code:
https://framagit.org/kostikov/core/commit/c71818096187dc84e6b44cf43bd178354b4c9de5Probably this can be useful in other places if someone is having similar problems.
!
Zotlabs|Hubzilla Development