Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1.slow log
Time: 2024-04-19T08:14:30.240692Z
User@Host: root[root] @ localhost [] Id: 695248
Query_time: 5.000470 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
use uni_mydb;
SET timestamp=1713514470;
select sleep(5);
2.I want to convert the above text into json as follows。Can mysql slow query log be parsed? Please give an example. Thanks.
{“time“:“2024-04-19 16:40:30”,
“user”:“root”,
"host":"localhost",
"query_time","5.000",
"lock_time":"0.000",
"rows_sent":1,
"rows_examined”:0,
"sql_text”:"select sleep(5);"}
Beta Was this translation helpful? Give feedback.
All reactions