June 19, 2013

Comment: Slow Query Log analyzes tools

slow queries executed from other users than root for at least 3 seconds, remove duplicates and save result to file php mysql_filter_slow_log.php -T=3 -eu=root –no-duplicates mysql-slow-queries.log # Start permanent filtering of all slow queries from now on…

Post: Read/Write Splitting with PHP Webinar Questions Followup

… a presentation on “Read/Write Splitting with PHP” for Percona Webinars.  If you missed it, …$_SESSION in the MySQL database for persistence, but when we measured query load with pt-query-digest, we found…in sync continuously. Q: If a slave is slow because of bandwidth issues, the seconds behind …

Comment: Debugging sleeping connections with MySQL

… a PHP driven website). If there is a bottleneck, a vicious cycle occurs: 1. apache requests increase 2. mysql queries increase 3. mysql slow queries increase… to the database only when the first query occurs – e.g: function query ($query) { if (!mysql_connection) mysql_connect(); return mysql_query(); } – Reduce slow queries (always a good strategy!)

Post: Debugging sleeping connections with MySQL

slow or not available and you’re not dealing with timeouts properly. Or may be you have several connections to MySQL server and right now running query which takes that long ?…can connect to PHP process or apache with mod_php and provide backtrace in PHP terms …

Comment: MySQL Query Cache WhiteSpace and comments

… server, but it’s disabled by default: http://bugs.mysql.com/bug.php?id=26215 I’m running the 5.0.56… by the query recorded in the slow query log). However, when I ran this php script: I *did* see the comment in the slow log: # Time: 080325 9:31:43 # User@Host: dbadmin[dbadmin] @ localhost [] # Query

Comment: Too many connections? No problem!

…I have my website develop in PHP with MYSQL, these are MYSQL values: datadir=/data/mysql socket=/data/mysql/mysql.sock max_connections = 600 wait_…=America/Caracas log-slow-queries=/var/log/mysql-slow-queries.log long_query_time=15 log-queries-not-using-indexes query_cache_type=1 query_cache_size=…

Comment: Slow Query Log analyzes tools

Unfortunately the comments here do not translate the “greater than” and “less than” symbols on submit. Therefore I will use { and } as a replacement for the example above: php mysql_filter_slow_log.php -T=3 -eu=root –no-duplicates { linux-slow.log } mysql-slow-queries.log

Comment: Slow Query Log analyzes tools

… the MySQL Slow Query Log filter: http://code.google.com/p/mysql-log-filter/ You can access the initial PHP5 script here (requires the PHP extension BCMath): http://mysql-log-filter.googlecode.com/svn/trunk/mysql_filter_slow_log.php I am planning to provide…

Comment: MySQL for Hosting Providers - how do they manage ?

Query | 0 | NULL | show full processlist | | 282 | root | localhost | NULL | Query | 3 | init | select sleep(10) | +—–+——+———–+——+———+——+——-+———————–+ mysqlSlow query log is not a real solution because you want to stop the queries… access, PHP access,…

Comment: What time 18446744073709550.000 means

…Shlomi, regarding negative times in slow query logs I filed this bug http://bugs.mysql.com/bug.php?id=35396, a patch was committed…