XF 2.2 Query in XF slow in PMA fast


Exactly this query, once executed in XF and once via phpMyAdmin, results in different times. Anybody got an idea?

SELECT content_user_id
                                FROM xf_reaction_content AS rc
                                LEFT JOIN xf_post AS post ON (rc.content_id = post.post_id)
                                LEFT JOIN xf_thread USING(thread_id)
                                WHERE  node_id = 42 AND rc.content_type = 'post'
                                AND rc.content_user_id IN (1, 2, 3, 4, 8, 9, 10, 885, 95452, 454454)

0.0017 sec in phpMyAdmin (with SQL_NO_CACHE)
0.154118 sec in XF

whether I use $db->query or $db->fetchAll

Any ideas?

I believe the phpMyAdmin query will have an implicit limit clause, while the XF query doesn't.

Fetching ~97000 rows will likely be slower than ideal
Top Bottom