# Slowlog parameter issues

**URL:** <https://forums.percona.com/t/slowlog-parameter-issues/29640>\
**Category:** Percona Server for MySQL\
**Created:** [April 9, 2024, 11:55am UTC](https://forums.percona.com/t/slowlog-parameter-issues/29640 "2024-04-09T11:55:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keyman\_Lu](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@Keyman\_Lu](https://forums.percona.com/u/Keyman_Lu)\
**Post date:** [April 9, 2024, 11:55am UTC](https://forums.percona.com/t/slowlog-parameter-issues/29640/1 "2024-04-09T11:55:49Z")

</div>

I found the system variable log\_throttle\_queries\_not\_using\_indexes could not limit the the number of sql wirting in slowlog file.  
I have tried 2 release 8.0.32 and the latest image 8.0.36-28, both of them have same issue.  
but mysql community edition works with this system variable.

I provide following test case to reproduce the issue:  
1: pull images from docker hub:  
docker pull percona/percona-server:latest  
2, run image  
docker run --rm -d -p 3306:3306 --name percona-server -e MYSQL\_ROOT\_PASSWORD=ChangeMe percona/percona-server:latest

3,login to docker to access db:  
docker exec -it percona-server bash

4, login to mysql  
mysql -uroot -pChangeMe

5, change parameter for slowlog:  
mysql\> set global slow\_query\_log =ON ;  
Query OK, 0 rows affected (0.01 sec)

mysql\> set global log\_slow\_admin\_statements=on;  
Query OK, 0 rows affected (0.00 sec)

mysql\> set global min\_examined\_row\_limit=1000;  
Query OK, 0 rows affected (0.00 sec)

mysql\> set global log\_queries\_not\_using\_indexes=on;  
Query OK, 0 rows affected (0.00 sec)

mysql\> set global log\_throttle\_queries\_not\_using\_indexes=4;  
Query OK, 0 rows affected (0.00 sec)

6, mark down the location of slowlog file:  
show variables like ‘slow\_query\_log\_file’;

7, setup test table:  
create database kk;  
use kk;  
CREATE TABLE tab\_test (  
id int NOT NULL,  
name varchar(10) DEFAULT NULL,  
address varchar(50) DEFAULT NULL,  
PRIMARY KEY (id)  
) ENGINE=InnoDB ;

DELIMITER //  
CREATE PROCEDURE insertRandomData()  
BEGIN  
DECLARE i INT DEFAULT 10;  
WHILE i \<= 10000 DO  
INSERT INTO tab\_test(id, name, address)  
VALUES (i, CONCAT(‘Name’, i), CONCAT(‘Address’, i));  
SET i = i + 1;  
END WHILE;  
END;  
//  
DELIMITER ;  
CALL insertRandomData();  
– wait about 30 seconds to generate records.  
– then exit db and tail slowlog just mark down. /var/lib/mysql/xxxx-slow.log  
exit;  
tail -f /var/lib/mysql/xxxx-slow.log

8, open another terminal to login docker and db;  
docker exec -it percona-server bash  
mysql -uroot -pChangeMe

9, run serval times sql below:  
select \* from tab\_test where address =‘yyyyyyyyyyyyyyy’;

we can see this sql keep rolling in the slowlog tailing in the other terminal.  
The mysql community edition works as expected : after run 4 times of the sql. the slowlog stop rolling and 1 min later it came out :

 ![企业微信截图_17126579451248](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/c/c7ea17b9396190bdef9a0ae754bd58df7ae845d7.png)

so please help to check whether it is a bug or any other setting we need to fix? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 9, 2024, 1:39pm UTC](https://forums.percona.com/t/slowlog-parameter-issues/29640/2 "2024-04-09T13:39:13Z")

</div>

@Keyman_Lu Since you have a repeatable test case, I suggest you open an official bug report at [https://jira.percona.com](https://jira.percona.com) so one of our engineers can take a closer look.

---

<div class="post-metadata">

**Author:** ![Keyman\_Lu](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@Keyman\_Lu](https://forums.percona.com/u/Keyman_Lu)\
**Post date:** [April 10, 2024, 2:54am UTC](https://forums.percona.com/t/slowlog-parameter-issues/29640/3 "2024-04-10T02:54:40Z")

</div>

got it, thanks for your advice.

---

<div class="post-metadata">

**Author:** ![Keyman\_Lu](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@Keyman\_Lu](https://forums.percona.com/u/Keyman_Lu)\
**Post date:** [April 10, 2024, 3:37am UTC](https://forums.percona.com/t/slowlog-parameter-issues/29640/4 "2024-04-10T03:37:38Z")

</div>

I have raised an issue in jira  
[https://perconadev.atlassian.net/browse/PS-9191](https://perconadev.atlassian.net/browse/PS-9191)  
so anyone who came with same problem will get the way to track.
