Help
General ArrowChat talk that doesn't fit any other forum.
User avatar
jcom
Customer
 
Posts: 25
Joined: 27 Apr 2016, 01:19

 

by jcom 08 May 2016, 15:14

I'm getting lots of mysql-slow queries mostly with : UPDATE arrowchat_status

the thing is those queries look simple enough and I've barely 1000 rows in arrowchat_status table.

Here is some examples:

Code: Select all
# Time: 160509  0:12:38
# User@Host: root[root] @ localhost []
# Query_time: 2.162604  Lock_time: 0.000020 Rows_sent: 0  Rows_examined: 2
SET timestamp=1462745558;
UPDATE arrowchat
                                SET arrowchat.user_read = '1'
                                WHERE arrowchat.from = '941786'
                                        AND arrowchat.to = '940397'
                                        AND arrowchat.user_read = '0';
# User@Host: root[root] @ localhost []
# Query_time: 2.176691  Lock_time: 0.000024 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462745558;
UPDATE arrowchat_status
                                SET session_time = '1462745556'
                                WHERE userid = '941717';


I'm running on a quite powerful machine and also have push service in place.

I also modified the userid fild to make it INT(11) rather than the varchar(25) (I only use ints for ids anyway) but still lots of performance issues.

Should I make some changes like ading a LIMIT 1? What do you think?

Thanks!
User avatar
jcom
Customer
 
Posts: 25
Joined: 27 Apr 2016, 01:19

 

by jcom 08 May 2016, 15:34

Every seconds I'm getting slow queries, more examples:

Code: Select all
# Time: 160509  0:34:42
# User@Host: root[root] @ localhost []
# Query_time: 2.606979  Lock_time: 0.000019 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462746882;
UPDATE arrowchat_status
                                SET session_time = '1462746879'
                                WHERE userid = '941786';
# Time: 160509  0:35:20
# User@Host: root[root] @ localhost []
# Query_time: 1.930524  Lock_time: 0.000025 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462746920;
UPDATE arrowchat_status
                                SET session_time = '1462746918'
                                WHERE userid = '939562';

# Time: 160509  0:35:57
# User@Host: root[root] @ localhost []
# Query_time: 2.145086  Lock_time: 0.000023 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462746957;
UPDATE arrowchat_status
                                SET status = 'available'
                                WHERE userid = '941786';
# Time: 160509  0:35:59
# User@Host: root[root] @ localhost []
# Query_time: 2.460417  Lock_time: 0.000022 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462746959;
UPDATE arrowchat_status
                                SET session_time = '1462746956'
                                WHERE userid = '146329';
# Time: 160509  0:36:00
# User@Host: root[root] @ localhost []
# Query_time: 3.412327  Lock_time: 0.000019 Rows_sent: 0  Rows_examined: 1
SET timestamp=1462746960;
UPDATE arrowchat_status
                                SET status = 'busy'
                                WHERE userid = '941786';


And I only have like 5 users online..
User avatar
jcom
Customer
 
Posts: 25
Joined: 27 Apr 2016, 01:19

 

by jcom 11 Sep 2016, 21:00

Anything ?
User avatar
jcom
Customer
 
Posts: 25
Joined: 27 Apr 2016, 01:19

 

by jcom 25 Sep 2016, 00:06

up p up