/
Slow query logging
Slow query logging
You may need to test and review slow queries on a database. By default slow queries are not logged.
To enable slow query logging, add 'logslow' => 1
to the dboptions array in config.php. This will cause queries over one second (the '1' can be changed to any number of seconds) to be logged in the 'log_queries' table in the database.
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
'logslow' => 1
;
The log_queries table can be exported and sent to Totara Support.
Most database administrations tools (such as MySQL Workbench, PHPMyAdmin, etc.) have a graphical user interface for this. You can also do this from the command line on the server.
Only enable slow query logging long enough to test slow queries and immediately disable after testing.
, multiple selections available,
Related content
How to log slow queries
How to log slow queries
More like this
Logging database queries
Logging database queries
More like this
Configuring Totara for development
Configuring Totara for development
More like this
How to obtain SQL code and parameters for a report
How to obtain SQL code and parameters for a report
More like this
.How to obtain SQL code and parameters for a report v1
.How to obtain SQL code and parameters for a report v1
More like this
View web server error logs
View web server error logs
More like this