Categories
Twitter

Automated twitter compilation up to 04 October 2020

Arbitrary tweets made by TheGingerDog up to 04 October 2020

Categories
Twitter

Automated twitter compilation up to 01 September 2019

Arbitrary tweets made by TheGingerDog up to 01 September 2019

Categories
bash mysql

Bash / MySQL queries…

Reduce connection counts to MySQL by using an array to get many values at once (assuming they’re single ‘word’ values)

Categories
mysql

Finding and killing long running MySQL queries

Sometimes (Woocommerce?) related queries on a MySQL server can seemingly run forever and eventually lead to the server being clogged up (and few free connections). Something like this can help …. (i.e. kill all MySQL queries which have been running longer than 900 seconds, and aren’t from the ‘root’ user).

Categories
Twitter

Automated twitter compilation up to 23 October 2016

Arbitrary tweets made by TheGingerDog up to 23 October 2016

Categories
mysql

Cleaning up a lot of WordPress _transients

WordPress seems to like hiding a load of ‘transient’ (cacheable) stuff in it’s wp_options table. Unfortunately for one site, it seems it didn’t bother to clean up the transient stuff, leaving behind about 750,000 records… which made a WP version upgrade painful, as MySQL locks the wp_option table which causes all other page loads to […]

Categories
debian linux mysql performance

MySQL Max_connections stuck on 214 ?

I found MySQL was being annoying earlier and not ‘accepting’ my max_connections = 450 directive on a Debian Wheezy install, and being seemingly stuck on having 214 connections….

Categories
mysql performance

MySQL update/write query analysis (query profiling)

Do you have a slow MySQL update/insert/delete query? Obviously, for ‘SELECT’ queries you can prepend the query with “EXPLAIN ” – however that doesn’t work for the other query types (UPDATE/INSERT/DELETE). So, one solution which may explain why the query is slow is to turn on MySQL’s profiling functionality, like in the following example :

Categories
development php

Late to the performance party

Everyone else probably already knows this, but $project is/was doing two queries on the MySQL database every time the end user typed in something to search on to get the data between a set range (SELECT x,y….. LIMIT n, OFFSET m or whatever) and another to get the total count of records (SELECT count(field) ….). […]