brent
brent

Reputation: 1105

MariaDb Slow Query log - only query time is high

I have the following entry in my slow query log:

Query_time: 4.000347 
Lock_time: 0.000095 
Rows_sent: 0 
Rows_examined: 0

update `my_table` set `a` = null, `b` = 'x', c= ... (updating around 20 fields) where `id` = 1234;

id is the primary key in this table; and there is a record which matches this id

A select by PK is fast. And in most cases update by PK runs a lot faster; so I'm trying to work out the cause of the slower ones.

No significant spikes show up on CPU, I/O or memory monitoring; and the load on the system is relatively flat.

There seems to be some pattern with how close to exactly 4 seconds these queries are. Its not like I have a distribution between 2 and 6 seconds; they all right on 4!

The 4 second PK updates show up in little groups; and some of them came 4 seconds; 1 after the other.

All that; seems to indicate something ... odd.

enter image description here

There are over 1000 db connections on the server, so I'm wondering if there could be some thread scheduling stuff clogging things up from time to time?

Upvotes: 0

Views: 274

Answers (0)

Related Questions