16 Jul

Unobvious "Unknown column in 'field list'" error

Recently we got request from our customer that something is going wrong with their database and they're are getting strange errors after each insert or update to specific table. The strangeness caused by "Unknown column 'column-name' in 'field list'" message while this column was existing in this table. Our investigation shown that this was caused by trigger on the table they were trying to do the insert/update. This trigger did the insert to another table where the mentioned column didn't exist. Let me show you example:

Read More
06 Mar

Handling hierarchy and travesing Social networks in MySQL with OQGraph

From time to time we detect query patterns that are not well fitted to the BTree+ structures provided by InnoDB. One such situation is when you need to traverse a hierarchy (tree) or graph structure with many nodes. Specialist databases exist for this such as Neo4J. However there exists a simple solution in the form of  OQGraph which is distributed with MariaDB and is documented here.

Read More
01 Sep

Hunting for "Locked" queries with pt-stalk utility

Recently we faced an issue when Nagios reported significant amount of "Locked" queries. To investigate and debug the issue we needed to get more insight about the state of MySQL and the OS at the time the locks occurred. This is how we got the much needed information.

Read More