From 7c807ec112b6599afea2351676b67708ad155dfe Mon Sep 17 00:00:00 2001 From: Jos Poortvliet Date: Thu, 14 Aug 2014 18:50:53 +0200 Subject: [PATCH] Update performance.rst Small style fixes --- developer_manual/general/performance.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/developer_manual/general/performance.rst b/developer_manual/general/performance.rst index be1be8c15..971117a98 100644 --- a/developer_manual/general/performance.rst +++ b/developer_manual/general/performance.rst @@ -26,29 +26,29 @@ With MySQL is is very easy with just a bit of configuration: 1. Slow query log. -If you put this into your my.cnf file than every query that takes longer than one second is logged to a logfile. +If you put this into your my.cnf file than 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 - long_query_time=1 + log_slow_queries = 1 + log_slow_queries = /var/log/mysql/mysql-slow.log + long_query_time=1 If a query takes over one second than we have a serious problem of course. You can watch it with `tail -f /var/log/mysql/mysql-slow.log` while using ownCloud. 2. log all queries. -If you reduce the long_query_time to zero than 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. +If you reduce the long_query_time to zero than 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 + log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time=0 3. log queries without an index. -If you increase the long_query_time to 100 and add log-queries-not-using-indexes than 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. +If you increase the long_query_time to 100 and add log-queries-not-using-indexes than 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 + log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time=100 Measuring performance