Summary of the latest MySQL interview questions in 2020 (basic-actual combat-advanced advanced)

Foreword
As a programmer, you are not unfamiliar with MySQL, especially in the Internet industry, where you use MySQL a lot. For job seekers, MySQL is the focus of the interview. Many people have the dream of being a big company, but they are defeated because of MySQL. In fact, MySQL is not difficult. Today’s most comprehensive MySQL summary will help you to "fire" at major companies, and the interview will no longer be stumped by MySQL.

Insert picture description here

MySQL interview questions (basic part)

The difference between drop, truncate and delete
What are the three database paradigms?
What is the difference between union and union all? What is the difference between
char, varchar2 and varchar?
What are the combined queries?
SQL statement execution sequence
null meaning
MySQL, SqlServer, oracle write character storage, string to time
update statement can modify the data in the result set?
The difference between B-tree and B+tree have
you seen indexes? The principles of
indexing index types, such as primary key index.
View SQL execution plan.
There are 100,000 pieces of data. Write SQL statements to query several data
sub-queries with larger values ​​in a field What is the difference between
MySQL InnoDB and Mysaim?
The difference between optimistic lock and pessimistic lock? ?
The difference between row lock and table lock?
What is the database isolation level? what's the effect?
The basic principle of MySQL master-slave synchronization.
How to optimize database performance (index, sub-database and table, batch operation, paging algorithm, upgrade hard disk SSD, business optimization, master-slave deployment)
SQL under what circumstances will not use index (not including, not equal to, function)
generally in what field Build indexes (fields with the most filtered data)
MySQL, B+ index implementation, row lock implementation, SQL optimization
How to solve the problem of high concurrency and inventory reduction
Several granularities of database transactions
Insert picture description here

MySQL interview questions (actual part)

Database three paradigms, design data tables based on the spike scenario
. Master-slave replication of the database.
How to solve the deadlock in the
case of mysql concurrency (through transaction, isolation level, lock)
triggers?
What is a stored procedure? What to call?
The advantages and disadvantages of stored procedures?
The difference between stored procedures and functions
The role of indexes? And what are its advantages and disadvantages?
What kind of fields are suitable for indexing What are the
index types?
What is a transaction? What is a lock?
What is a view? What is a cursor?
Advantages and disadvantages of views
List several table connection methods, what is the difference?
The difference between primary key and foreign key?
How to optimize the query speed in the database is very slow?
What are the three paradigms of database?
What is the difference between Varchar2 and varchar?
The difference between Oracle and Mysql?
The difference between order by and group by

Insert picture description here

MySQL interview questions (advanced advanced part)

Please explain the concept and main features of relational database?
Please tell us the typical products, characteristics and application scenarios of relational databases?
Please explain the concept and main features of non-relational database?
Please tell us the typical products, characteristics and application scenarios of non-relational databases?
Please describe in detail the SQL statement classification and corresponding representative keywords.
Please describe the difference between char(4) and varchar(4) in detail.
How to authorize oldboy users to access the database from 172.16.1.0/24.
What is MySQL multi-instance and how to configure MySQL multi-instance?
How to strengthen MySQL security, please give specific feasible measures?
What is the difference between delete and truncate to delete data?
How to solve the problem of excessive MySQL Sleep threads?
What does the sort_buffer_size parameter do? How to make online changes effective?
How to clean MySQL binlog online correctly?
What are the working modes of Binlog? What are the characteristics of each and how do companies choose?
I executed a SQL statement in the drop library by mistake. How to recover completely?
mysqldump backup uses the -A -B parameters, how to restore a single table?
Describe the principle of MySQL master-slave replication and the complete steps to configure master-slave.
How to enable the binlog function of the slave library?
How does MySQL realize bidirectional master-slave replication and explain the application scenarios?
How does MySQL realize cascade synchronization and explain the application scenarios?
How to solve MySQL master-slave replication failure?
How to monitor whether the master-slave replication fails?
How does MySQL database realize read-write separation?
The production one master and multiple slaves are down, how to manually recover?
Insert picture description here

21 best practices for MySQL performance optimization

Optimizing your query for query caching
EXPLAIN your SELECT query
When only one row of data is required, use LIMIT 1
to build an index for the search field
. Use a similar type of example when joining the table and index it.
Do not ORDER BY RAND() to
avoid SELECT *
is always set an ID per table
using ENUM instead of VARCHAR
() acquired from the PROCEDURE ANALYSE recommended
to use as much as possible nOT NULL
Prepared Statements
unbuffered query
with the IP address into memory UNSIGNED INT
table of fixed length will be faster
vertical dividing
demolition The larger the DELETE or INSERT statement, the
smaller the column, the faster.
Choose the right storage engine.
Use an Object Relational Mapper.
Be careful of "permanent links."

At last

In order to help everyone better interview and study, here is a complete set of video tutorials for architects and systematic materials on java. From Javase-ssm-springcloud, including java core knowledge points, interview topics and 20 years of the latest Internet There are real questions, e-books, etc., which are very useful for friends and college students who want to learn Java or want to change careers. They are free to share with everyone~ Friends in need can click the link below to get them for free!
Link: Click here! ! ! Password: CSDN

Guess you like

Origin blog.csdn.net/XingXing_Java/article/details/108310681