Shinguz's blog

Beware of large MySQL max_sort_length parameter

Taxonomy upgrade extras: 

Today we had a very interesting phenomena at a customer. He complained that MySQL always get some errors of the following type:

FromDual Performance Monitor for MySQL and MariaDB 0.10.6 has been released

FromDual has the pleasure to announce the release of the new version 0.10.6 of its popular Database Performance Monitor for MySQL, MariaDB, Galera Cluster and Percona Server fpmmm.

MySQL Environment MyEnv 1.3.1 has been released

FromDual has the pleasure to announce the release of the new version 1.3.1 of its popular MySQL, Galera Cluster, MariaDB and Percona Server multi-instance environment MyEnv.

Temporary tables and MySQL STATUS information

Taxonomy upgrade extras: 

When analysing MySQL configuration and status information at customers it is always interesting to see how the applications behave. This can partially be seen by the output of the SHOW GLOBAL STATUS command. See also Reading MySQL fingerprints.

MySQL spatial functionality - points of interest around me

Taxonomy upgrade extras: 

This week I was preparing the exercises for our MySQL/MariaDB for Beginners training. One of the exercises of the training is about MySQL spatial (GIS) features. I always tell customers: “With these features you can answer questions like: Give me all points of interest around me!”

Why you should take care of MySQL data types

Taxonomy upgrade extras: 

A customer reported last month that MySQL does a full table scan (FTS) if a query was filtered by a INT value on a VARCHAR column. First I told him that this is not true any more because MySQL has fixed this behaviour long time ago. He showed me that I was wrong:

Differences between MySQL and MariaDB

Taxonomy upgrade extras: 
  • max_user_connections Can be changed online in MySQL. Cannot be changed in MariaDB if value was set to 0.
  • PERFORMANCE_SCHEMA is enabled in MySQL 5.6 and 5.7 by default. In MariaDB disabled by default.
  • Replication incompatibilities from MariaDB (Master) to MySQL (Slave)
  • MariaDB 10.2.0 still contains XtraDB 5.6. So MySQL 5.7 features cannot be used.
  • MariaDB 10.2 Window Functions are missing in MySQL 5.7
  • SHOW PROCESSLIST has additional column Progress in MariaDB.
  • Progress indication in: mysqldump --progress-reports (default on) for MariaDB.
  • MariaDB 10.0 on CentOS 7 uses still SysV init script. MySQL 5.6 on CentOS 7 uses SystemD init script.
  • binlog_row_image is implemented in MySQL 5.6 and does not exist in MariaDB 10.0.
  • MariaDB 10.1 and older (containing XtraDB 5.6) does not provide flexible/general tablespaces yet which where introduced by MySQL 5.7.
  • EXPLAIN FOR CONNCECTION does exist in MySQL 5.7 and does not exist in MariaDB 10.1 or 10.2.

Other sources

MariaDB 10.2 Window Function Examples

MariaDB 10.2 has introduced some Window Functions for analytical queries.

Galera Cache sizing

Taxonomy upgrade extras: 

To synchronize the data between the Galera Cluster and a new or re-entering Galera node Galera Cluster uses 2 different mechanisms:

binlog_rows_query_log_events

Taxonomy upgrade extras: 

Hi oli

Since MySQL 5.6.2 there is a new MySQL variable called binlog_rows_query_log_events. If you enable this variable MySQL will write the original SQL statements into the binary logs. More information about this variable you can find here:

Max_used_connections per user/account

How many connections can be opened concurrently against my MySQL or MariaDB database can be configured and checked with the following command:

InnoDB plugin is enabled

Taxonomy upgrade extras: 

InnoDB plugin is enabled.

InnoDB Log File size is too small

The InnoDB Log File (innodb_log_file_size) size is possibly too small.
Choosing a too small InnoDB Log File size can have significant write performance impacts.

InnoDB Foreign Key error detected

MySQL (InnoDB, PBXT, NDB, TokuDB) support Foreign Keys to show relatations between tables. Those relations can be enforced through Foreign Key Constraints.

InnoDB Force Recovery is enabled

Taxonomy upgrade extras: 

InnoDB Force Recovery (innodb_force_recovery) is enabled. This mode should be used for data recovery purposes only. It prohibits writing to the data.

InnoDB Flush Log at Transaction Commit

InnoDB Flush Log at Transaction Commit is set to a values != 1. This can lead to a loss of committed transactions in case of a power failure or an unclean shutdown of your database.

InnoDB Deadlock detected

Taxonomy upgrade extras: 

You got an InnoDB Deadlock. Please talk to your development department to fix this problem. Deadlocks are an application problem!

InnoDB Buffer Pool Instances is too small

If you are using MariaDB/MySQL 5.5 and newer you should use several InnoDB Buffer Pool Instances for performance reasons.
Some rules to size InnoDB Buffer Pool instances are:

Binlog format MIXED with filtering

Binlog format MIXED changes the binary log format (ROW or STATEMENT) depending on the queries (deterministic or not). This makes it impossible to define 100% correctly working binary log filter rules.

Flush time is set

If the variable flush_time is set to a non-zero value, all tables are closed (and flushed) every flush_time seconds to disk. This can cause unnecessary and high I/O spikes.

Pages

Subscribe to RSS - Shinguz's blog