Bug Catastrophically poor performance when viewing "IP" dialog & in approval queue

There is a bug in this version
X

Xon

Guest
While the "Delete IP usage data after" option does help, MySQL can still pick the utterly wrong indexes which can result in very bad performance.

In the IP dialog, and the approval queue, \XF\Entity\User::getIp calls XF\Repository\IP::getLoggedIp which then triggers this query;

SQL:

Code:
SELECT ip
FROM xf_ip
WHERE content_type = 'user'
        AND content_id = 'xxx'
        AND action = 'register'
ORDER BY log_date DESC
LIMIT 1;

However the indexes for the table are...

Read more

Continue reading...