A set of useful queries on INFORMATION_SCHEMA follows. These queries can be used when approaching a new database, to learn about some of its properties, or they can be regularly used on an existing schema, so as to verify its integrity.
I will present queries for:
* Checking on database engines and size
* Locating duplicate and redundant indexes
* Checking on character sets for columns and tables, looking for variances
* Checking on processes and long queries
"Standard SQL" is something you read about. All popular databases have modified version of SQL. Each database adds its own flavor and features to the standard. MySQL is no different.
Some deviations are storage engine dependent. Others are more general. Many, such as INSERT IGNORE, are commonly used. Here's a list of some MySQL deviations to SQL, which are not so well known.
During my work with companies using MySQL, I have encountered many issues with regard to schema design, normalization and indexing. Of the most common errors are incorrect data types definition.
Here's a compilation of "the right and the wrong" data types.
When MySQL's root password is lost and must be reset, there are two popular ways to create a new password. One of the options is far too popular, in my opinion. The preferred way of setting a root's password is by using an init-file. The process for doing this is well explained in MySQL's manual. [...]
In Part I of this article, we have seen how the internal structure of the storage engine's index can affect an execution plan. We've seen that some plans are inherent to the way engines are implemented. We wish to present a second scenario in which execution plans vary for different storage engines. Again, we will [...]
A popping question is: "Can an execution plan change for different storage engines?" The answer is "Yes". I will present two such cases, where the MySQL optimizer will choose different execution plans, based on our choice of storage engine. We will consider MyISAM and InnoDB, the two most popular engines. The two differ in many [...]