I found Dennis the Menace, he now has a job as system administrator for a hosting company. Scenario: client has a problem with a server becoming unavailable (cause unknown) and has it restarted. MySQL had some page corruption in the InnoDB tablespace. The hosting provider, being really helpful, goes in as root and first deletes [...]
Filed under: Good practice / Bad practice by arjen on Monday, October 31, 2011 | Social tagging: destruction > helpful > hosting > InnoDB > logfile > mysql > recovery > sysadmin > tablespace
21 Comments »
In 2007, Etsy made a big bet on homegrown middleware to help with the site’s scalability. A half-year after it was taken live, the company decided to abandon it. As a senior software engineer at Etsy put it, “if you’re doing something ‘clever,” you’re probably doing it wrong.” Read the full article at Arstechnica.com I [...]
Filed under: Good practice / Bad practice by arjen on Wednesday, October 5, 2011 | Social tagging: architecture > design > enterprise > middleware > mysql > scalability > scaling > stored procedures
No Comments »
XKCD (as usual) makes a very good point – this time about password strength, and I reckon it’s something app developers need to consider urgently. Geeks can debate the exact amount of entropy, but that’s not really the issue: insisting on mixed upper/lower and/or non-alpha and/or numerical components to a user password does not really [...]
Filed under: Good practice / Bad practice by arjen on Thursday, August 11, 2011 | Social tagging: application > database > entropy > java > mariadb > mysql > password > php > python > rails > ruby > security > web > xkcd
No Comments »
A user on a linux user group mailing list asked about this, and I was one of the people replying. Re-posting here as I reckon it’s of wider interest. > [...] tens of gigs of data in MySQL databases. > Some in memory tables, some MyISAM, a fair bit InnoDB. According to my > understanding, [...]
Filed under: Good practice / Bad practice, Software and tools by arjen on Tuesday, March 29, 2011 | Social tagging: backup > mariadb > mmm > mysqldump > recovery > replication > restore > xtrabackup
No Comments »
You take a look at someone’s MySQL (or MariaDB) data directory, and see mysql foo bar -> foo What’s the issue? Identify pattern. What does it mean? Consequences. Is there any way it can be safe and useful/usable? Describe. Good luck!
Filed under: Good practice / Bad practice by arjen on Monday, August 2, 2010 | Social tagging: database > datadir > mariadb > mysql > symbolic link > symlink
3 Comments »
So this is about a SELECT COUNT(*) FROM tblname without a WHERE clause. MyISAM has an optimisation for that since it maintains a rowcount for each table. InnoDB and PBXT can’t do that (at least not easily) because of their multi-versioned nature… different transactions may see a different number of rows for the table table! [...]
Filed under: Good practice / Bad practice by arjen on Thursday, May 27, 2010 | Social tagging: COUNT > index scan > InnoDB > mariadb > MyISAM > mysql > pbxt > reporting
4 Comments »
What’s the difference between INT(2) and INT(20) ? Not a lot. It’s about output formatting, which you’ll never encounter when talking with the server through an API (like you do from most app languages). The confusion stems from the fact that with CHAR(n) and VARCHAR(n), the (n) signifies the length or maximum length of that [...]
Filed under: Good practice / Bad practice by arjen on Monday, March 29, 2010 | Social tagging: birthdate > data types > database > date-of-birth > int > integer > mariadb > mysql > year
No Comments »
We don’t often see this option configured (default: unlimited) but it might be a good idea to set it. What it does is limit the amount of disk space the combined relay logs are allowed to take up. A slave’s IO_Thread reads from the master and puts the events into the relay log; the slave’s [...]
Filed under: Good practice / Bad practice by arjen on Wednesday, March 24, 2010 | Social tagging: mariadb > mysql > relay-log-space-limit > replication
No Comments »
Some guidelines to choosing between MySQL’s numeric types, using longitude and latitude as a modelling example.
Filed under: Good practice / Bad practice by toby on Wednesday, December 23, 2009 | Social tagging: accuracy > decimal > double > float > integer > latitude > longitude > mariadb > modelling > mysql > numeric > precision > sql
No Comments »
We got good responses to the “identify this query profile” question. Indeed it indicates an SQL injection attack. Obviously a code problem, but you must also think about “what can we do right now to stop this”. See the responses and my last note on it below the original post. Got a new one for [...]
Filed under: Good practice / Bad practice by arjen on Wednesday, October 28, 2009 | Social tagging: master > mysql > open query > replication > slave > trivia
5 Comments »