Kunena 7.0.2 Released

The Kunena team has announce the arrival of Kunena 7.0.2 [K 7.0.2] in stable which is now available for download as a native Joomla extension for J! 5.3.x/5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Solved K 3.0.2 with many user records slow due to bad query

More
12 years 5 months ago - 12 years 5 months ago #149268 by johanst
Hi,
i have 10000 user records in my joomla/kunena website.
after upgrading from kunena 2.0 to 3.0.2, showing the list of users in kunena admin brings mysql server to 100% for about 5 minutes.

debug on revealed this query:

SELECT a.*,ku.*
FROM #__users AS a
LEFT JOIN #__kunena_users AS ku ON a.id=ku.userid
ORDER BY a.username ASC

that is 10000 x 10000 records in my database!

see class KunenaAdminModelUsers -> getListQuery()

limiting the query won't help, according to mysql EXPLAIN:

mysql> explain SELECT a.*,ku.* FROM uvniu_users AS a LEFT JOIN uvniu_kunena_users AS ku ON a.id=ku.userid ORDER BY a.username ASC limit 1, 100;

| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
| 1 | SIMPLE | a | ALL | NULL | NULL | NULL | NULL | 9007 | Using temporary; Using filesort |
| 1 | SIMPLE | ku | ALL | NULL | NULL | NULL | NULL | 9400 | |
2 rows in set (0.00 sec)


also omitting the sorting has no effect.

Can it be avoided to use the LEFT JOIN on these tables?
Last edit: 12 years 5 months ago by johanst.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #149269 by xillibit
Hello,

Thanks for the report, can-you put here please your Kunena report configuration settings ?

The following query is executed only one time, so it's not that which make slowing the render of the page :
Code:
SELECT a.*,ku.* FROM #__users AS a LEFT JOIN #__kunena_users AS ku ON a.id=ku.userid ORDER BY a.username ASC

I will investigate on the subject

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago - 12 years 5 months ago #149275 by sozzled
Something for your guys to think about: there are 3½ times that number of users here at www.kunena.org (> 35,000 users) and producing a user list takes a fraction of a second. I think there's something else going on here and johant's configuration report may provide us with the necessary clues.
Last edit: 12 years 5 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #149278 by johanst
here is my report config:

This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 128M | Max file upload: 8M

Kunena menu details:

Warning: Spoiler!

Joomla default template details : fmk | author: | version: 2.5.0 | creationdate: Unknown

Kunena default template details : Blue Eagle 2.0 | author: Kunena Team | version: 3.0.2 | creationdate: 2013-08-18

Kunena version detailed: Kunena 3.0.2 | 2013-08-18 [ Nocturne ]
| Kunena detailed configuration:

Warning: Spoiler!
| Kunena integration settings:
Warning: Spoiler!
| Joomla! detailed language files installed:
Warning: Spoiler!

Third-party components: None

Third-party SEF components: None

Plugins: None

Modules: None


on the way home i realized that knowing what indexes have been set on the two database tables involved might also be of importance:

mysql> show index from uvniu_users;
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
| uvniu_users | 0 | PRIMARY | 1 | id | A | 9007 | NULL | NULL | | BTREE | |
| uvniu_users | 1 | usertype | 1 | usertype | A | 19 | NULL | NULL | | BTREE | |
| uvniu_users | 1 | idx_name | 1 | name | A | 9007 | NULL | NULL | | BTREE | |
| uvniu_users | 1 | idx_block | 1 | block | A | 39 | NULL | NULL | | BTREE | |
| uvniu_users | 1 | username | 1 | username | A | 9007 | NULL | NULL | | BTREE | |
| uvniu_users | 1 | email | 1 | email | A | 9007 | NULL | NULL | | BTREE | |
6 rows in set (0.00 sec)

and

mysql> show index from uvniu_kunena_users;
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
| uvniu_kunena_users | 1 | group_id | 1 | group_id | A | 1 | NULL | NULL | YES | BTREE | |
| uvniu_kunena_users | 1 | posts | 1 | posts | A | 59 | NULL | NULL | YES | BTREE | |
| uvniu_kunena_users | 1 | uhits | 1 | uhits | A | 1 | NULL | NULL | YES | BTREE | |
| uvniu_kunena_users | 1 | banned | 1 | banned | A | 9400 | NULL | NULL | YES | BTREE | |
| uvniu_kunena_users | 1 | moderator | 1 | moderator | A | 2 | NULL | NULL | YES | BTREE | |
5 rows in set (0.00 sec)

i will have a look myself too at these. thanks for your quick responses.

johan

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #149279 by johanst
might it be that table uvniu_kunena_users is missing an index on userid field?

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #149281 by sozzled
Where does this website of yours exist? The site is not on the internet and it looks like you may have edited your configuration report to remove certain information that might point to the cause of the proble; it's hard to say. If this site exists on a private internet or on your own PC then the reason for the poor performance may have something to do with the way that your SQL server is configured.

It is also possible that your database indexes have been corrupted. I really do not know by only looking at what information you have given us in your configuration report.

Please Log in or Create an account to join the conversation.

Time to create page: 0.322 seconds