phpclub
New Member
Have perfomance problem in Article Layout
In List Layout - all OK
Maybe problem in parse BB code ?
IMHO: Need add index
ALTER TABLE `xf_user` ADD INDEX `document_count` ( `xfa_document_count` )
Code:
Page Time: 13.7403s
Memory: 7.4804 MB (Peak: 8.5736 MB)
Queries (14, time: 0.0028s, 0.0%)
In List Layout - all OK
Code:
Page Time: 0.0880s
Memory: 6.1429 MB (Peak: 6.6682 MB)
Queries (12, time: 0.0035s, 4.0%)
Maybe problem in parse BB code ?
IMHO: Need add index
ALTER TABLE `xf_user` ADD INDEX `document_count` ( `xfa_document_count` )
SELECT user.*, user_profile.*
FROM xf_user AS user
LEFT JOIN xf_user_profile AS user_profile ON
(user.user_id = user_profile.user_id)
WHERE user.xfa_document_count > 0
ORDER BY user.xfa_document_count DESC
LIMIT 5
Run Time: 0.000152
Select Type Table Type Possible Keys Key Key Len Ref Rows Extra
SIMPLE user ALL 21369 Using where; Using filesort
SIMPLE user_profile eq_ref PRIMARY PRIMARY 4 user.user_id 1
FROM xf_user AS user
LEFT JOIN xf_user_profile AS user_profile ON
(user.user_id = user_profile.user_id)
WHERE user.xfa_document_count > 0
ORDER BY user.xfa_document_count DESC
LIMIT 5
Run Time: 0.000152
Select Type Table Type Possible Keys Key Key Len Ref Rows Extra
SIMPLE user ALL 21369 Using where; Using filesort
SIMPLE user_profile eq_ref PRIMARY PRIMARY 4 user.user_id 1