

Secondary keys are updated by a background process. However, generally speaking, we recommend using sequential primary keys for most use cases. You can find a deeper dive into issues around UUIDs and primary keys here. There are some use cases where sequential primary keys are not the right choice - a good example here is the Universally Unique IDentifier or UUID. using quasi-sequential values) prevents primary key fragmentation and thus reduces I/O operations required to find leaf nodes. The data is also stored using B-tree indexes, so inserting data in an ordered way (i.e. If you don’t take this into account in your schema design, then your performance will be negatively impacted. In InnoDB, the primary key is clustered and every secondary key adds an entry pointer to the primary key. Why is this? In InnoDB, everything is a primary key! This relates to the way InnoDB organizes the data. Since MySQL moved to InnoDB as the default storage engine in version 5.6, the schema design becomes even more important. This is a cross relational database technology principle, as normal forms were introduced back in the 1970s. Schema design is one of the most important things that you will do in your database. 1: Schema design is just as important as any other MySQL settings Here are 10 more MySQL performance tuning tips to add to your list. Although the earlier article is still relevant, there are additional steps you can take to achieve the best performance for your MySQL deployment. This article updates a previous set of MySQL performance tuning tips provided by Baron Schwartz. There have been some important new developments in the last few years for MySQL as well. However, it can be challenging to use and there are many opportunities to improve performance. It’s an effective relational database management system that has been at the heart of popular applications for years.

MySQL is the world’s most widely used open source database, and ranks a close second in popularity among databases overall.
