امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
getIpsByUser effectively uses the following query:
SQL:
Although it looks complicated, this can be optimized quite a bit by an index on
Read more
SQL:
کد:
SELECT ip,
MIN(log_date) AS first_date,
MAX(log_date) AS last_date,
COUNT(*) AS total
FROM xf_ip
WHERE user_id = ?
GROUP BY ip
ORDER BY last_date DESC
LIMIT 150;
(user_id, ip, log_date DESC). It's not a perfect optimization, but it should be good enough for all but the largest forums. Larger forums may be able to get better...Read more
