I enabled the slow query logging on my AWS mariadb RDS as described here. And set up the publishing to Cloudwatch logs.
Parameter group family:
mariadb10.11
My parameters:
<code>log_output = FILE
log_slow_query_time = 0.2
log_slow_query = 1
</code>
<code>log_output = FILE
log_slow_query_time = 0.2
log_slow_query = 1
</code>
log_output = FILE
log_slow_query_time = 0.2
log_slow_query = 1
This works, as my slow querys are logged to Cloudwatch
<code>2024-08-21T11:13:15.000Z
# Time: 240821 11:13:15# User@Host: user[user] @ [1.2.3.4]
# Thread_id: 851891 Schema: dpd QC_hit: No
# Query_time: 0.301404 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
# Rows_affected: 0 Bytes_sent: 59
use db_name;
SET timestamp=1724932120;
SELECT SLEEP(0.3)
LIMIT 0, 200;
</code>
<code>2024-08-21T11:13:15.000Z
# Time: 240821 11:13:15# User@Host: user[user] @ [1.2.3.4]
# Thread_id: 851891 Schema: dpd QC_hit: No
# Query_time: 0.301404 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
# Rows_affected: 0 Bytes_sent: 59
use db_name;
SET timestamp=1724932120;
SELECT SLEEP(0.3)
LIMIT 0, 200;
</code>
2024-08-21T11:13:15.000Z
# Time: 240821 11:13:15# User@Host: user[user] @ [1.2.3.4]
# Thread_id: 851891 Schema: dpd QC_hit: No
# Query_time: 0.301404 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
# Rows_affected: 0 Bytes_sent: 59
use db_name;
SET timestamp=1724932120;
SELECT SLEEP(0.3)
LIMIT 0, 200;
But in addition to that there are also many log rows, that usually come after that.
<code>2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
</code>
<code>2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
</code>
2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
2024-08-21T11:13:15.000Z
Time Id Command Argument
This makes it harder to find the actual slow query. How can this be disabled?
I have tried:
<code>log_slow_min_examined_row_limit = 1
</code>
<code>log_slow_min_examined_row_limit = 1
</code>
log_slow_min_examined_row_limit = 1
But with this parameter still these rows appear
9