# percona server 5.5 query end status

**URL:** <https://forums.percona.com/t/percona-server-5-5-query-end-status/7101>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [July 8, 2019, 1:58am UTC](https://forums.percona.com/t/percona-server-5-5-query-end-status/7101 "2019-07-08T01:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liangyu5017](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@liangyu5017](https://forums.percona.com/u/liangyu5017)\
**Post date:** [July 8, 2019, 1:58am UTC](https://forums.percona.com/t/percona-server-5-5-query-end-status/7101/1 "2019-07-08T01:58:01Z")

</div>

Recently, I have had some very simple update statements that take a very long time to execute, up to about 6 seconds.  
percona-server:5.5.53  
table\_rows:7374453  
primary\_key:user\_id  
sql:  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 4 WHERE user\_id = 4124593 AND recommend\_votes\_num \>= 4  
(user\_id is primarykey)

* * *

binlog info:

# at 867369173

#190708 14:46:23 server id 6163699 end\_log\_pos 867369252 Query thread\_id=9221135 exec\_time=0 error\_code=0  
SET TIMESTAMP=1562568383/_!_/;  
BEGIN  
/_!_/;

# at 867369252

#190708 14:46:23 server id 6163699 end\_log\_pos 867369455 Query thread\_id=9221135 exec\_time=0 error\_code=0  
SET TIMESTAMP=1562568383/_!_/;  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 4 WHERE user\_id = 4124593 AND recommend\_votes\_num \>= 4  
/_!_/;

# at 867369455

#190708 14:46:23 server id 6163699 end\_log\_pos 867369482 Xid = 1260093514  
COMMIT/_!_/;

(both exec\_itme is 0)

* * *

slow\_log info:

# Time: 190708 14:46:27

# User@Host: db\_zh\_user1[db\_zh\_user1] @ [172.26.0.75]

# Thread\_id: 9221135 Schema: zongheng\_user\_1 Last\_errno: 0 Killed: 0

# Query\_time: 4.202410 Lock\_time: 0.000038 Rows\_sent: 0 Rows\_examined: 1 Rows\_affected: 1 Rows\_read: 1

# Bytes\_sent: 52 Tmp\_tables: 0 Tmp\_disk\_tables: 0 Tmp\_table\_sizes: 0

# Profile\_starting: 0.000026 Profile\_starting\_cpu: 0.000026 Profile\_checking\_permissions: 0.000003 Profile\_checking\_permissions\_cpu: 0.000003 Profile\_Opening\_tables: 0.000008 Profile\_Ope

ning\_tables\_cpu: 0.000009 Profile\_System\_lock: 0.000009 Profile\_System\_lock\_cpu: 0.000009 Profile\_init: 0.000060 Profile\_init\_cpu: 0.000061 Profile\_Updating: 0.000096 Profile\_Updating\_cp  
u: 0.000095 Profile\_end: 0.000003 Profile\_end\_cpu: 0.000003 Profile\_Waiting\_for\_query\_cache\_lock: 0.000002 Profile\_Waiting\_for\_query\_cache\_lock\_cpu: 0.000002 Profile\_end: 0.000012 Profil  
e\_end\_cpu: 0.000012 Profile\_query\_end: 4.202146 Profile\_query\_end\_cpu: 0.000069 Profile\_closing\_tables: 0.000021 Profile\_closing\_tables\_cpu: 0.000020 Profile\_freeing\_items: 0.000028 Prof  
ile\_freeing\_items\_cpu: 0.000028 Profile\_logging\_slow\_query: 0.000003 Profile\_logging\_slow\_query\_cpu: 0.000002

# Profile\_total: 4.202417 Profile\_total\_cpu: 0.000337

# InnoDB\_trx\_id: 2912B40F

# QC\_Hit: No Full\_scan: No Full\_join: No Tmp\_table: No Tmp\_table\_on\_disk: No

# Filesort: No Filesort\_on\_disk: No Merge\_passes: 0

# InnoDB\_IO\_r\_ops: 0 InnoDB\_IO\_r\_bytes: 0 InnoDB\_IO\_r\_wait: 0.000000

# InnoDB\_rec\_lock\_wait: 0.000000 InnoDB\_queue\_wait: 0.000000

# InnoDB\_pages\_distinct: 20

SET timestamp=1562568387;  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 4 WHERE user\_id = 4124593 AND recommend\_votes\_num \>= 4;

query\_end: 4.202146!!!

Can someone help me explain why this update takes so much time in the query end status?  
I hope percona experts can help me solve this problem or provide some ideas. This problem has been bothering me for several weeks. Thank you.

---

<div class="post-metadata">

**Author:** ![liangyu5017](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@liangyu5017](https://forums.percona.com/u/liangyu5017)\
**Post date:** [July 15, 2019, 5:24am UTC](https://forums.percona.com/t/percona-server-5-5-query-end-status/7101/2 "2019-07-15T05:24:38Z")

</div>

Looking for expert opinion, Any help will be appreciated

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [July 15, 2019, 8:38am UTC](https://forums.percona.com/t/percona-server-5-5-query-end-status/7101/3 "2019-07-15T08:38:29Z")

</div>

Hello liangyu5017

It may be that you will get some help with this from the user community, though I think it may be very specific to your environment. Did you see that we have a free-to-access webinar on troubleshooting performance issues? That might be worth you looking at. Sveta is one of our most experienced engineers, and will have valuable advice in that webinar:

[URL][Upcoming Webinars](https://www.percona.com/resources/webinars/introduction-troubleshooting-performance-what-affects-query-execution%5B/URL%5D)

There are also a few more resources that might help you resolve the issue yourself:

There is also a more recent webinar from our CEO, Peter Zaitsev, from last year [URL][Upcoming Webinars](https://www.percona.com/resources/webinars/performance-analysis-and-troubleshooting-methodologies-databases%5B/URL%5D)

See how you get on with those maybe and also do check out the blog for the Q&A follow ups for those posts.
