Conscience recommended by Tencent technical experts, a book of efficient database optimization

introduction

For a "veteran" who has been working as a DBA for more than ten years, you have to ask me what is the biggest headache in database management? I will tell you that endless optimization will be a nightmare for many DBAs, I believe this is also the feeling of many colleagues! Why is this happening? Is the ability of the DBA not good, can't it be optimized well?

This article is a professional article on database optimization. It can be seen from the article that database optimization is not only a matter of DBA, but requires all relevant personnel to cooperate with each other in design, development and testing, operation and maintenance, and hardware selection so as to maximize the possibility Improve the performance of the database.

The difference between this article and many database monographs is that the author can interpret and discuss the ideas of database optimization from the perspective of front-line development engineers. At the same time, it gives a large number of code examples and reference SQL, so that readers can practice one by one according to the examples in the book. , Help to deepen the understanding of database optimization.

In the process of reading this article, you will also be delighted to find that while expanding the space, the author introduces many knowledge points of databases in a simple and simple way. These basic knowledge are essential for developers to understand the working principle of databases, as well as DBAs to master and operate databases. Will be of great help! I believe this article will help many people.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

This article will introduce to you from the table of contents, main content and readers. You can read it step by step. You will find that the content is getting deeper and deeper, allowing you to learn more knowledge. I hope this article can help you learn!

table of Contents

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

main content

This article is divided into four parts.

The first part is the introduction (chapters 0 to 1).

This part first combines my years of work experience, summarizes some of the difficulties that may be faced when SQL statement optimization, and then tells some common misunderstandings about SQL optimization, so that readers can correctly view SQL statement optimization.

Chapter 1 describes a few cases I have dealt with. Through these live cases, readers can more intuitively feel the importance of SQL statement optimization. At the same time, after each enterprise case, I also summarized the problems that occurred in the case.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

The second part is the principle chapter (chapters 2-9)

Chapter 2 describes the core component of SQL statement optimization-optimizer, and the most basic concept of optimization-cost. This part is very important and it is recommended that beginners read it carefully.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapters 3 to 6 introduced several important concepts related to optimization: execution plan, statistical information, SQL parsing, cursors, and bind variables. This part is relatively basic. It is recommended that beginners choose to read according to the situation.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapters 7 to 8 introduce the entity objects of SQL statements and how they store data physically. This part is of great help to the database structure design. In addition, when optimizing SQL statements, you also need to consider related objects, because optimization measures may affect other statements of the object and need to be considered.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapter 9 introduces some of Oracle's proprietary SQL statements. Using these sentences can sometimes achieve unexpected results. If you do not consider the problem of database platform migration, you can make full use of these statements.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

The principle article is the basis for us to enter the practice article, it covers almost all the principle knowledge related to SQL optimization. Through the study of these contents, readers can lay a good foundation for the following SQL optimization. If you already have the relevant knowledge base, you can directly enter the practice chapter.

The third part is SQL (Chapter 10-16).

Chapter 10 introduces an important optimization method-query conversion. The content of this chapter is relatively difficult, and there are few relevant materials on the market, which can be used as a key point.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapter 11 describes how to access data objects. The content of this chapter is very basic and can also be used as a focus.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapters 12~16 introduce a variety of operations and common optimization methods, including table associations, semi/anti-joins, subqueries, sorting, and parallelism. For this part of the content, readers can focus on reading according to actual needs.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

The fourth part is the practical chapter (chapters 17-22).

Chapter 17 describes in detail how to formulate a series of specifications from the aspects of structure design and SQL development for different databases, such as Oracle and MySQL. The purpose is to make the first-line architecture, R&D, and operation and maintenance personnel have rules to follow.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapter 18 mainly analyzes the method of establishing a complete database architecture evaluation model. Simulate stress testing by establishing performance baselines and business stress models, and determine optimization solutions based on test results. According to the relevant characteristics of the performance problem, such as overall or partial, occasional slowness or continuous slowness, etc., analyze layer by layer from the statement level, object level, database level, database architecture level, application architecture level, business architecture level and other dimensions to find the bottleneck of the problem point.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapter 19 mainly introduces the method of sketching database portrait. Database portrait, that is, relying on existing database objects, sentences, access characteristics, performance, etc. to collect and analyze data, help us form a basic understanding of the database, and formulate operation and maintenance management strategies, technical solutions, Migration plan and workload, etc.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

Chapters 20-22 deeply analyze the methods of building a database audit platform. With the help of the audit rules set by the platform, we can quickly discover potential risks in the database. For R&D personnel, they can use the platform to locate problems and achieve the purpose of assisting design and development work. For DBAs, they can use the platform to quickly grasp the overall situation of multiple systems, screen inefficient SQL in batches, and quickly diagnose general Sexual issues.

Written by three Ali experts: Database efficient optimization: architecture and standard SQL skills documentation

 

This [Database Efficient Optimization: Architecture, Specifications and SQL Skills] has a total of 438 pages. If you need a full version, you can get it in the following ways!

Features of this article and target audience

1. This article has the following characteristics:

  • The content in the article is born out of the project and developed from the perspective of front-line development engineers
  • Pay attention to actual combat. Almost all chapters are equipped with code. Readers can directly write the code in the actual working environment and run most of the code with detailed instructions for easy understanding.
  • Covers many aspects of SQL statements, especially the second part, which can be used as a work manual for everyone to refer to when optimizing.

2. Audience

This article mainly explains the content related to the SQL statement optimization of the Oracle database. In addition to some Oracle's own optimization features, the core optimization ideas introduced in the article are also applicable to other relational databases. The article does not explain the Oracle architecture and SQL language itself. It is assumed that most people are already familiar with Oracle and SQL language.

Specifically, the key targets for reading this article include but are not limited to the following:

  • Oracle database developers.
  • Database architect, database administrator.
  • Practitioners of other relational databases.
  • Those who are interested in SQL statement optimization.
  • Computer-related majors in colleges and universities.

I hope this can help you to learn, so that we grow the faster and improve their value!

I also hope that this article will be liked by everyone, repost a lot and pay attention to not get lost, and continue to update good articles later!

Guess you like

Origin blog.csdn.net/weixin_50020950/article/details/109645518