• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question MySQL - Active transactions and operations?

Servus

Basic Pleskian
Hi at all,
I want to optimize my MySQL database for example InnoDB Buffer Pool Size.
Therefor I performed this test:
Code:
mysql> SELECT CONCAT(ROUND(KBS/POWER(1024,
    -> IF(PowerOf1024<0,0,IF(PowerOf1024>3,0,PowerOf1024)))+0.49999),
FROM (SELECT SUM(data_length+index_length) KBS FROM information_schema.tables
    -> SUBSTR(' KMG',IF(PowerOf1024<0,0,
    -> IF(PowerOf1024>3,0,PowerOf1024))+1,1)) recommended_innodb_buffer_pool_size
    -> FROM (SELECT SUM(data_length+index_length) KBS FROM information_schema.tables
    -> WHERE engine='InnoDB') A,
    -> (SELECT 3 PowerOf1024) B;
+-------------------------------------+
| recommended_innodb_buffer_pool_size |
+-------------------------------------+
| 1G                                  |
+-------------------------------------+
1 row in set (0.20 sec)

mysql> \q
Bye

But it's strictly recommended to be sure that there are no active transactions and operations!

Could you please help me to find out if there are active transactions and operations?
I don't know how to find this out.
Greets
 
You can check TRANSACTIONS and ROW OPERATIONS in the output of command

mysql> SHOW ENGINE INNODB STATUS;
 
Thanks for help, @IgorG. The command prints tons of informations, also for section transactions.
Which value(s) give me the correct information if there pending transactions or not?
From my point of view there are no pending transactions, I'm not sure.

Code:
------------
TRANSACTIONS
------------
Trx id counter 347848
Purge done for trx's n:o < 0 undo n:o < 0 state: running but idle
History list length 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421698644977504, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
--------
FILE I/O
--------
 
Back
Top