Writing in the front
In the Internet industry, MySql database is undoubtedly the most commonly used database. Due to its small size, fast speed, low total cost of ownership, especially the characteristics of open source, many small and medium-sized websites choose MySql as the website database in order to reduce the total cost of ownership.
As a programmer, MySql must not be unfamiliar, especially in the Internet industry, the use of MySql is more. For job seekers, MySql is a key question that will be asked in the interview. Many people dream of big factory, but fail because of MySql.
In order to learn Mysql, we must give you a wave of high Performance Mysql (Edition 3), the classic of Mysql. (795 pages)
◎ “As long as you don’t pretend to be an expert on MySQL, how dare you miss this amazing book?”
◎ “In a word, well written, well choreographed, and extremely easy to refer to!”
◎ “I read the last edition of High Performance MySQL (Version 3) from cover to cover, but I didn’t hesitate to pick up this book, and I don’t regret it…”
◎ Learn about MySQL’s new features, including storage engines, partitioned databases, triggers, and views
◎ Replication improvements, high availability, and clustering
◎ Get high performance for running MySQL in the cloud
◎ Optimized advanced query features, such as full-text indexing
◎ Benefit from modern multicore cpus and solid-state drives
◎ Explore backup and recovery strategies, including new online backup tools
Content abstract
This book is a classic in the MySQL field, with a wide range of influence. Release 3 contains a number of updates, including new features in the latest MySQL5.5 release, as well as new content on solid state drives, highly scalable design, and databases in cloud computing environments. There are also significant extensions and additions to the benchmarking and performance tuning sections. The book is divided into 16 chapters and 6 appendices, covering MySQL architecture and history, benchmark testing and performance analysis, database software and hardware performance optimization, replication, backup and recovery, high availability and scalability, aS well as MySQL in the cloud and MySQL related tools. Each chapter is a relatively independent topic, and the reader can choose to read it on its own.
Forward + attention scan
This book is not only suitable for database administrators (DBAs), but also for developers. No matter database novice or expert, I believe all can gain from this book.
An overview of the
Chapter 1: MySql architecture and history
Chapter 1 is a very basic chapter, and it is recommended that you familiarize yourself with it before going further. You should understand how MySql is organized before you can use it effectively. This chapter explains the architecture of MySQL and the key design of its storage engine. If you are not familiar with the basics of databases and transactions, this chapter can also help. If you are already familiar with other relational databases such as Oracle, this chapter will also help you get started with MySQL. This chapter also covers a little background on MySQL’s history: its evolution over time, recent changes in company ownership, and what we think is important.
Build a solid foundation
Chapter 2: MySql benchmarks
Chapter 2 discusses the basics of benchmarking, such as the type of workload a server can handle, the speed at which a particular task can be handled, and so on. Benchmarking is a critical skill to use to assess how a server performs under different loads, but it’s also important to understand when benchmarking doesn’t work.
Chapter 3: Server performance profiling
Chapter 3 introduces a response time-oriented approach that we often use for fault diagnosis and server performance problem analysis. This method has been proven to solve some of the most intractable problems we’ve ever encountered. There is also the option to modify the method we use (in fact, our method is also modified from Cary Millsap’s method), but at least there is no way to guess without methods.
Chapter 4: Schema and data type optimization
Chapters 4 through 6 cover three topics in a row about the fundamentals of good database logical design and physical design. Chapter 4 covers the detailed differences between different data types and the principles of table design.
Chapter 5: Creating high-performance indexes
Chapter 5 discusses indexes, which are the physical design of databases. An in-depth understanding and utilization of indexes is fundamental to efficient use of MySQL, and I’m sure you’ll need to revisit this chapter often.
You can get the electronic version of “High Performance MySql (Version 3)” for free.
Chapter 6: Query performance optimization
Chapter 6 covers the topic of analyzing how MySQL queries are executed and how to leverage the query optimizer. The chapter also contains numerous examples of common types of queries that demonstrate how MySQL does its job and how queries can be adapted to take advantage of MySQL’s features.
Chapter 7: advanced MySql features
At this point, you’ve covered the basics of a database: tables, indexes, data, and queries. Chapter 7 goes beyond the basics of MySQL to show how the advanced features of MySQL work. This chapter covers partitioning, storage engines, triggers, and character sets. These features may be implemented differently in MySQL than in other databases and may not have been previously known to the reader, so understanding them may have new performance benefits.
Configuring the application
The next two chapters show how MySQL, applications, and hardware work well together.
Chapter 8: Optimizing server Settings
Chapter 8 describes how to configure MySQL to take advantage of the hardware for better reliability and robustness.
Chapter 9: Operating system and hardware optimization
Chapter 9 explains how to make the operating system and hardware work better. Solid state drives are also discussed in depth, providing suggestions for hardware configuration for better performance in highly scalable applications.
Both chapters in 8/9 cover the insides of MySQL to some extent. This will be a recurring theme, and the appendix will provide a look at the inner workings of MySQL. Understanding this knowledge will help readers better understand the principles behind some of the phenomena.
MySQL as an infrastructure component
MySQL does not exist in a vacuum, but is part of the whole application, so the robustness of the entire application architecture needs to be considered. The following sections show how to do this.
Chapter 10: Replication
Chapter 10 discusses MySQL’s killer feature: the ability to set up multiple servers to synchronize data from a single master server. Unfortunately, replication is also a feature of MySQL that can be frustrating for many users. This shouldn’t be the case, and this chapter will show you how to make replication work better.
You can get the electronic version of High Performance MySql (Version 3) for free by forwarding + following and replying to “888” or “666”.
Chapter 11: Extensible MySql
Chapter 11 discusses what scalability is (which is not the same thing as performance), why applications and systems fail to scale, and what can be done to improve scalability. If done correctly, MySQL is scalable enough to handle any need.
Chapter 12: High availability
Chapter 12 deals with a related but entirely different topic of extensibility: how to ensure that MySQL continues to run reliably and correctly.
Chapter 13: MySql in the Cloud
Chapter 13 shows you what happens differently when MySQL runs in a cloud computing environment.
Chapter 14: Application layer Optimization
Chapter 14 explains full-stack Optimization, which is overall optimization from the front end to the back end, from the user experience all the way to the database.
Chapter 15: Backup and Recovery
Even the best-designed and most scalable architecture in the world is not a good architecture if a power outage leads to a complete collapse that can’t withstand malicious attacks, application bugs, programmer errors, and other disaster scenarios. Chapter 15 discusses various MySQL database backup and restore scenarios. These strategies can help readers reduce downtime in the event of a variety of hard-to-resist hardware failures and ensure that data is ultimately recoverable in the event of a variety of disasters.
Forward + attention scan
Other useful topics
In the final chapter and appendices of this book, we explore topics that do not fit neatly into previous chapters, as well as topics that require special attention because they are referenced in multiple previous chapters.
Chapter 16: MySql User tools
Chapter 16 explores several tools, some open source and some commercial, that can help users manage and monitor MySQL servers more effectively.
The appendix
- Appendix A describes three major non-official MySQL releases that have grown rapidly in recent years, one of which is A product that our company maintains. It’s valuable to know what other options are available; Many of the thorny problems with MySQL that are difficult to solve may not be a problem in other variants. Two of these three versions (Percona Server and MariaDB) are fully replaceable versions of MySQL, so the cost of trying them out is relatively low. Of course, we should also add that the official version of MySQL provided by Oracle works fine for most users.
- Appendix B demonstrates how to check the MySQL server. Knowing how to get state information from the server is very important; It’s even more important to know what these states mean. This overrides the output of SHOW INNODB STATUS, so it contains in-depth information about the INNODB transaction storage engine. Much of InnoDB’s internals are discussed in this appendix.
- Appendix C shows how to efficiently copy large files from one place to another. This kind of operation is often encountered when managing large amounts of data.
- Appendix D demonstrates how to actually use and understand the EXPLAIN command. Appendix E demonstrates how to break the problem of interfering locks requested by different queries. Finally, Appendix F introduces Sphinx, a high-performance full-text indexing system based on MySQL.
Forward + follow
You can get the electronic version of High Performance MySql (Version 3) for free.