# Xa transaction questions

**URL:** <https://forums.percona.com/t/xa-transaction-questions/7093>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [July 3, 2019, 1:05am UTC](https://forums.percona.com/t/xa-transaction-questions/7093 "2019-07-03T01:05:18Z")\
**Posts on this page:** 2\
**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 3, 2019, 1:05am UTC](https://forums.percona.com/t/xa-transaction-questions/7093/1 "2019-07-03T01:05:18Z")

</div>

We are running on Percona-Server-5.5.53.  
We’ve had a problem lately，there are some very simple update SQL statements take a long time.These statements are logged to slow-log.  
When I execute these SQL manually in the database, the execution time is in milliseconds,But when the program executes SQL, the execution time is between 2 and 6 seconds。I executed a script that collected the “show engine innodb status” information every second,some of which was as follows:

--------show engine innodb status:  
—TRANSACTION 284B7BC9, ACTIVE (PREPARED) 0 sec committing  
mysql tables in use 1, locked 1  
2 lock struct(s), heap size 376, 1 row lock(s), undo log entries 1  
MySQL thread id 8572882, OS thread handle 0x7f6e31286700, query id 1231452122 172.26.0.74 user1 query end  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 3 WHERE user\_id = 7174307 AND recommend\_votes\_num \>= 3

—TRANSACTION 284B8FC4, ACTIVE (PREPARED) 1 sec  
mysql tables in use 1, locked 1  
2 lock struct(s), heap size 376, 1 row lock(s), undo log entries 1  
MySQL thread id 8572882, OS thread handle 0x7f6e31286700, query id 1231463252 172.26.0.74 user1 query end  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 3 WHERE user\_id = 2723238 AND recommend\_votes\_num \>= 3

—TRANSACTION 284B8FAD, ACTIVE (PREPARED) 1 sec  
mysql tables in use 1, locked 1  
2 lock struct(s), heap size 376, 1 row lock(s), undo log entries 1  
MySQL thread id 8573333, OS thread handle 0x7f7168ab6700, query id 1231463183 172.26.0.70 user1 query end  
update user\_info SET recommend\_votes\_num = recommend\_votes\_num - 4 WHERE user\_id = 4133846 AND recommend\_votes\_num \>= 4

My questions is :  
1.Whether these transactions are XA transactions?  
2.What determines whether a transaction is an xa transaction,  
3.My program does not use XA transactions. If these transactions are XA transactions, why does percona-server5.5.53 recognize them as XA transactions

I hope someone can help me. Thank you very much!

---

<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 3, 2019, 5:15am UTC](https://forums.percona.com/t/xa-transaction-questions/7093/2 "2019-07-03T05:15:56Z")

</div>

Hello Liangyu5017

Here are some links that may help you understand XA transactions:  
[LIST]  
[_]A webinar [URL][Upcoming Webinars](https://www.percona.com/resources/webinars/xa-transactions%5B/URL%5D)  
[_]Percona blog post [URL][https://www.percona.com/blog/2017/09/22/how-to-deal-with-xa-transactions-recovery/[/URL]](https://www.percona.com/blog/2017/09/22/how-to-deal-with-xa-transactions-recovery/%5B/URL%5D)  
[\*]And a post by Valerii Kravchuk on his blog that reviews some of the issues related with XA transactions [URL][https://mysqlentomologist.blogspot.com/2018/10/on-mysql-xa-transactions.html[/URL]](https://mysqlentomologist.blogspot.com/2018/10/on-mysql-xa-transactions.html%5B/URL%5D)  
[/LIST] The problem itself looks to be something that is a little too involved for us to handle in a Forum post, as it’s heading towards the kind of thing that our professional services would address. If you would like me to put you in touch with someone to look at options you are welcome to email me … [lorraine.pocklington&#64;percona.com](mailto:lorraine.pocklington&#64;percona.com) It’s possible that someone in the Community will be able to offer you more in depth help, but from the Percona point of view it seems more like something our support team would need to look at.

I am sure that you know that we’d encourage you to upgrade from version 5.5 at this stage, as that is getting pretty old now. I am sure that you have good reasons for sticking with 5.5, but we could also help with that.
