slow log entries..what do these queries mean?

slow log entries..what do these queries mean?

by Jerry Lau -
Number of replies: 1

What do these in the slow log mean or do?

...

# Time: 2019-02-17T12:22:03.737532Z

# User@Host: root[root] @ localhost []  Id: 1157990

# Query_time: 96.823558  Lock_time: 0.000000 Rows_sent: 11721867  Rows_examined: 11721867

SET timestamp=1550406123;

SELECT /*!40001 SQL_NO_CACHE */ * FROM `mdl_question`;

# Time: 2019-02-17T12:22:33.578746Z

# User@Host: root[root] @ localhost []  Id: 1157990

# Query_time: 29.557382  Lock_time: 0.000000 Rows_sent: 9471146  Rows_examined: 9471146

SET timestamp=1550406153;

SELECT /*!40001 SQL_NO_CACHE */ * FROM `mdl_question_answers`;

# Time: 2019-02-17T12:23:00.735374Z

# User@Host: root[root] @ localhost []  Id: 1157990

# Query_time: 27.150846  Lock_time: 0.000000 Rows_sent: 13651850  Rows_examined: 13651850

SET timestamp=1550406180;

SELECT /*!40001 SQL_NO_CACHE */ * FROM `mdl_question_attempt_step_data`;

# Time: 2019-02-17T12:23:22.124677Z

# User@Host: root[root] @ localhost []  Id: 1157990

# Query_time: 21.382610  Lock_time: 0.000000 Rows_sent: 12738531  Rows_examined: 12738531

SET timestamp=1550406202;

SELECT /*!40001 SQL_NO_CACHE */ * FROM `mdl_question_attempt_steps`;

....


Average of ratings: -
In reply to Jerry Lau

Re: slow log entries..what do these queries mean?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Judging by the results of a quick Google search (https://stackoverflow.com/questions/8282788/what-does-select-n-sql-no-cache-from-mytable-mean-in-in-mysqls-slow) these queries come from mysqldump saving the dat abase. (Part of your backup system I guess?)

I am pretty sure Moodle did not execute those queries, because there is no mention of SQL_NO_CACHE anywhere in the code.


Average of ratings: Useful (1)