当前位置:网站首页>I also gave you the MySQL interview questions of Boda factory. If you need to come in and take your own

I also gave you the MySQL interview questions of Boda factory. If you need to come in and take your own

2022-07-01 04:38:00 Program ape DD_

I saw many friends asking for interview information before ,

Make arrangements now !

Previously shared Spring Information , Have you all received it ,

If not , Click to get it for free !

What we share today is MySQL Relevant interview questions ,

f39f152901ee8957068cb72312ad80b8.png

Old rules ,

In order to make it convenient for everyone to save and read ,

I packed the complete information and answers into pdf

Pay attention to the official account below. SpringForAll Community ,

Reply key words 【MySQL】

You can get it for free complete pdf Information !

Part of the information content


Indexes

What is index ?

Index is a method used by storage engine to improve the access speed of database tables data structure .

Advantages and disadvantages of index ?

advantage :

  • Speed up data discovery

  • Add an index to the fields used for sorting or grouping , Sure Speed up grouping and sorting

  • Speed up the connection between tables

shortcoming :

  • Indexing requires Take up physical space

  • It will reduce the efficiency of adding, deleting and modifying tables , Because the table records are added, deleted and modified every time , Need to carry out Dynamic maintenance index , As a result, the addition, deletion and modification time becomes longer

The function of index ?

Data is stored on disk , When querying data , If there is no index , All data will be loaded into memory , Search in turn , More disk reads . With the index , You don't need to load all the data , because B+ The height of the tree is generally 2-4 layer , At most, you only need to read 2-4 Secondary disk , The query speed is greatly improved .

When you need to build an index ?

  1. Fields that are often used for queries

  2. Often used to index connected fields , Can speed up the connection

  3. Fields that often need to be sorted are indexed , Because the index is in order , It can speed up Sorting Query

When not to build an index ?

  1. where Fields not used in conditions are not suitable for indexing

  2. The table records less

  3. It needs to be added, deleted and modified frequently

  4. Participate in column calculation The column of is not suitable for indexing

  5. The distinction is not high The field of is not suitable for indexing , Such as gender, etc

For your convenience

I have to All interview questions and answers It's sorted out

Pay attention to the official account below. , Reply key words "spring"

You can get it for free pdf Information

原网站

版权声明
本文为[Program ape DD_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202160249053461.html