mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
@@ -29,8 +29,8 @@ With MySQL it is very easy with just a bit of configuration:
|
||||
|
||||
If you put this into your my.cnf file, every query that takes longer than one second is logged to a logfile::
|
||||
|
||||
log_slow_queries = 1
|
||||
log_slow_queries = /var/log/mysql/mysql-slow.log
|
||||
slow_query_log = 1
|
||||
slow_query_log = /var/log/mysql/mysql-slow.log
|
||||
long_query_time=1
|
||||
|
||||
If a query takes more than a second we have a serious problem of course. You can watch it with `tail -f /var/log/mysql/mysql-slow.log` while using Nextcloud.
|
||||
@@ -39,8 +39,8 @@ If a query takes more than a second we have a serious problem of course. You can
|
||||
|
||||
If you reduce the long_query_time to zero then every statement is logged. This is super helpful to see what is going on. Just do a `tail -f` on the logfile and click around in the interface or access the WebDAV interface::
|
||||
|
||||
log_slow_queries = 1
|
||||
log_slow_queries = /var/log/mysql/mysql-slow.log
|
||||
slow_query_log = 1
|
||||
slow_query_log = /var/log/mysql/mysql-slow.log
|
||||
long_query_time=0
|
||||
|
||||
3. log queries without an index.
|
||||
@@ -48,8 +48,8 @@ If you reduce the long_query_time to zero then every statement is logged. This i
|
||||
If you increase the long_query_time to 100 and add log-queries-not-using-indexes, all the queries that are not using an index are logged. Every query should always use an index. So ideally there should be no output::
|
||||
|
||||
log-queries-not-using-indexes
|
||||
log_slow_queries = 1
|
||||
log_slow_queries = /var/log/mysql/mysql-slow.log
|
||||
slow_query_log = 1
|
||||
slow_query_log = /var/log/mysql/mysql-slow.log
|
||||
long_query_time=100
|
||||
|
||||
Measuring performance
|
||||
|
||||
Reference in New Issue
Block a user