What is this fairy MySQL series of documents: "(High-frequency interview questions + study notes documents and books + performance optimization 21 best practice documents + learning route)"

 Foreword:

Don't sell it, go straight to the topic! The content of the article is summarized as "high-frequency interview questions + study notes documents and books + performance optimization 21 best practice documents + learning route".

 1. Sorting out high-frequency real questions in the database over the years

  • 1. What kinds of locks are there in MySQL?
  • 2. What are the different tables in MySQL?
  • 3. Briefly describe the difference between MyISAM and InnoDB in the MySQL database
  • 4. The names of the four transaction isolation levels supported by InnoDB in MySQL, and the difference between each level?
  • 5. What is the difference between CHAR and VARCHAR?
  • 6. What is the difference between primary key and candidate key?
  • 7. What is myisamchk used for?
  • 8. If a table has a column defined as TIMESTAMP, what will happen?
  • 9. How do you see all the indexes defined for the table?
  • 10. What do% and _ in the LIKE statement mean?
  • 11. What is the column comparison operator?
  • 12. What is the difference between BLOB and TEXT?
  • 13. What is the difference between MySQL_fetch_array and MySQL_fetch_object?
  • 14. Where will the MyISAM tables be stored and also provide their storage format?
  • 15. How does MySQL optimize DISTINCT?
  • 16. How to display the first 50 lines?
  • 17. How many columns can be used to create an index?
  • 18. What is the difference between NOW() and CURRENT_DATE()?
  • 19. What is a non-standard string type?
  • 20. What is a general SQL function?
  • 21. Does MySQL support transactions?
  • 22. What field type is good for recording currency in MySQL
  • 23. What are the MySQL tables related to permissions?
  • 24. What can be the string type of the column?
  • 25. The MySQL database is used as the storage of the publishing system, with an increment of more than 50,000 entries per day. It is expected to operate and maintain for three years. How to optimize?
  • 26, lock optimization strategy
  • 27. The underlying implementation principle and optimization of the index
  • 28. Under what circumstances the index is set but cannot be used
  • 29. How to optimize MySQL in practice
  • 30. Methods to optimize the database
  • 31. Briefly describe the difference between index, primary key, unique index, and joint index in MySQL, and what impact on database performance (from both read and write)
  • 32. What is the transaction in the database?
  • 33. What causes SQL injection vulnerabilities? How to prevent it?
  • 34, select the appropriate data type for the fields in the table
  • 35. Storage period
  • 36. Indexes are a very important concept for relational databases. Please answer a few questions about indexes:
  • 37. Explain the difference between MySQL outer connection, inner connection and self connection
  • 38. Overview of transaction rollback mechanism in Myql
  • 39. What parts does the SQL language include? What are the operational keywords in each part?
  • 40. What are the integrity constraints?
  • 41. What is a lock?
  • 42. What is a view? What is a cursor?
  • 43. What is a stored procedure? What to call?
  • 44. How to understand the three paradigms in a popular way?
  • 45. What is a basic table? What is a view?
  • 46. ​​What are the advantages of views?
  • 47. What does NULL mean?
  • 48. The difference between primary key, foreign key and index?
  • 49. What can you use to ensure that the fields in the table only accept values ​​in a specific range?
  • 50. What are the methods to optimize SQL statements? (Choose a few)

2. Database study notes and books

  • 1. Four characteristics of transaction (ACID) atomicity, consistency, isolation, and durability?
  • 2. Concurrency of transactions? Transaction isolation level, what problems each level will cause, which level is MySQL by default?
  • 3. What is the difference between the three common MySQL storage engines (InnoDB, MyISAM, MEMORY)?
  • 4. What are the application scenarios of MySQL's MyISAM and InnoDB storage engines, transaction and lock levels?
  • 5. The order of execution of different elements of the query statement (where, jion, limit, group by, having, etc.)?
  • 6. What is a temporary table and when will the temporary table be deleted?
  • 7. What is the difference between MySQL B+Tree index and Hash index?
  • 8. The SQL query statement determines which type of index to create? How to optimize the query?
  • 9. What is the difference between a clustered index and a non-clustered index?
  • 10. What locks are there (optimistic locks, pessimistic locks), and how to add exclusive locks when selecting?
  • 11. What are the differences between non-relational databases and relational databases, and the advantages?
  • 12. Three paradigms of database, design data table according to a certain scene?
  • 13. 7 questions about database read-write separation, master-slave replication, master-slave replication analysis?
  • 14. Use explain to optimize sql and index?
  • 15. How to solve MySQL slow query?
  • 16. What is inner connection, outer connection, cross connection, Cartesian product, etc.?
  • 17. What kind of locks does mysql have, the principles and specific scenarios of deadlock determination, and how to solve the deadlock?
  • 18. What are the usage scenarios of varchar and char?
  • 19. MySQL high concurrency environment solution?
  • 20. Transaction recovery mechanism (REDO log and UNDO log) when the database crashes?

MySQL learning high-frequency knowledge points

MySQL learning roadmap (xmind)

MySQL learning books: MySQL + technical insider: InnoDB storage engine-3.pdf

Three, database performance optimization

  • 1. Optimize your queries for query caching
  • 2. EXPLAIN your SELECT query
  • 3. Use LIMIT 1 when there is only one row of data
  • 4. Build an index for the search field
  • 5. Use a similar type of example in the Join table and index it
  • 6. Never ORDER BY RAND()
  • 7. Avoid SELECT *
  • 8. Always set an ID for each table
  • 9. Use ENUM instead of VARCHAR
  • 10. Get suggestions from PROCEDURE ANALYSE()
  • 11. Use NOT NULL as much as possible
  • 12、Prepared Statements
  • 13. Unbuffered query
  • 14. Save the IP address as UNSIGNED INT
  • 15. Fixed-length tables will be faster
  • 16. Vertical split
  • 17. Split large DELETE or INSERT statements
  • 18. The smaller the column, the faster
  • 19. Choose the right storage engine
  • 20. Use an Object Relational Mapper
  • 21. Beware of "permanent links"

21 best practices for MySQ performance optimization

MySQL optimization problem learning roadmap (xmind)

Today, I will share so much about preparing for the autumn recruitment of MySQL. If you are interested in the various database learning materials mentioned in the article, you can like + follow, "Add my assistant VX" to receive these database learning materials for free . Let's prepare for the autumn move together!

                                                                          

Guess you like

Origin blog.csdn.net/a159357445566/article/details/108950803