The first interview with Ant Financial was stumped by MySQL, and after 3 months of fighting, he finally got the offer from Ali;

Einstein said, "Patience and perseverance will always get paid." I have always regarded this as my motto, and this motto has been completely realized in "me" this year.

Every programmer has a dream of a big factory, and I am no exception. At the beginning of the year, Ant Financial was asked by MySQL. Many related questions were not answered, and it was cold after only two. After I went back, I also concentrated on reviewing and prepared for World War II. Now I finally entered Ant Financial and was hired.

The following Alibaba interview questions (including answers), learning packages, actual combat documents, etc., can be shared with everyone, friends in need, like + comment, just read the end of this article!

01 Ant Financial Interview Questions for MySQL

The previous Alibaba interview questions are summarized, and the specific interview questions are organized into documents. This article is for the MySQL series, so the following only shows some of the MySQL problems that I was slammed and asked when I interviewed Ali for the first time. Other topics The content (including answers) of the documents can be obtained by privately writing to me [Interview].

1. Please explain the concept and main features of relational database?

2. Please tell us the typical products, characteristics and application scenarios of relational databases?

3. Please describe the SQL statement classification and corresponding representative keywords in detail.

4. What is MySQL multi-instance and how to configure MySQL multi-instance?

5. How to strengthen MySQL security, please give specific feasible measures?

6. Misoperation executed a SQL statement in the drop library, how to recover completely?

7. Detailed the principle of MySQL master-slave replication and the complete steps of configuring master-slave.

8. How does MySQL implement bidirectional master-slave replication and explain the application scenarios?

9. How does MySQL realize cascading synchronization and explain the application scenarios?

10. How to solve MySQL master-slave replication failure?

02 Interview questions for Ali, Tmall team during World War II (3 rounds of technical + HR)

Ant Financial Interview Technical Questions:

1. Introduce yourself

2. Project introduction (first introduce the project by yourself, then chat)

3. The usage of junit, the execution order of before, beforeClass, after, afterClass

4. Distributed lock

5. Nginx request forwarding algorithm, how to configure forwarding based on weight

6. What are the problems with using hashmap to implement redis (deadlock, dead loop, ConcurrentHashmap available)

7, the state of the thread

8, the way the thread is blocked

9. The difference between sleep and wait

10. The underlying implementation of hashmap

11. Ten thousand people grab 100 red envelopes, how to achieve it (without queue), how to ensure that 2 people cannot grab the same red envelope, and distributed locks are available

12. Java memory model, garbage collection mechanism, unreachable algorithm

13. Two Integer reference objects are passed to a swap method to exchange references within the method. After returning, will the values ​​of the two references be found to change?

14. The underlying implementation of AOP, how dynamic is the dynamic proxy? If there are 100 objects, how to dynamically proxy these 100 objects?

15. Have you ever used maven install, maven test, git (make install is to install local jar packages)

16. Various Tomcat configurations, how to configure docBase

17. Several ways of Spring bean configuration

18. Web.xml configuration

19. Spring listener.

20. The implementation mechanism of Zookeeper, there is a cache, how to store the registration service

21. Will IO block? Is readLine blocking

22. Have you used Spring's thread pool or Java's thread pool?

23. String formatting method (the two questions 20 and 21 are too low-level)

24. Time formatting method

25. What is the timer made of?

26, how the thread exits and ends

27. What locks does java have? Optimistic lock, pessimistic lock, synchronized, reentrant lock, read-write lock, have you used reentrantlock? The difference between reentrantlock and synmchronized

28, the use scenario of ThreadLocal

29. Java's memory model, garbage collection mechanism

30. Why do thread execution call start instead of run directly (direct run is no different from ordinary methods, start first, run will run as a thread method)

31. The realization mechanism of qmq messages (qmq is a message queue encapsulated by Qunar.com)

32. Three ways to traverse the hashmap

33, some commands of JVM

34, the difference between memcache and redis

35. Where is the row-level lock of Mysql added?

36. How is the lock of ConcurrentHashmap added? Is the more segments the better

37, the difference between myisam and innodb (innodb is a row-level lock, myisam is a table-level lock)

38, MySQL other performance optimization methods

39. Where to look at the Linux system log

40. How to check the network process?

41. Count the number of bit 1 in the binary representation of an integer

42, JVM memory model, java memory model

Answers to interview questions:

03 How did I review before World War II?

(1) MySQL topic section (first brush the topic)

1. What kinds of locks are there in Mysql?

2. Under what circumstances is the MYSQL data table easily damaged?

3. What field type is good for recording currency in MySQL

4. Does MYSQL support transactions?

5. Explain the access control list

6. What are general SQL functions?

7. What is a non-standard string type?

8. How many TRIGGERS are allowed in Mysql table?

9. What kind of objects can be created using the CREATE statement?

10. What is the difference between NOW() and CURRENT_DATE()?

11. How many columns can be used to create an index?

12. What is InnoDB?

13. How does Mysql optimize DISTINCT?

14. How to input characters as hexadecimal numbers?

15. How to display the first 50 rows?

......

Answers to MySQL interview questions:

(2) 21 best practices for MySQL 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"

(3) MySQL performance tuning and architecture design

Basic articles:

1. Basic introduction to MySQL

2. MySQL architecture composition

3. Introduction to MySQL storage engine

4. MySQL security management

5. MySQL backup and recovery

Performance optimization articles:

1. Relevant factors affecting the performance of MySQLServer

2. MySQL database locking mechanism

3. Optimization of MySQL database query

4. Performance optimization of MySQL database schema design

5. MySQLServer performance optimization

6. Optimization of commonly used storage engines

Architecture design articles:

1. Basic principles of MySQL scalable design

2. MySQLReplication of scalability design

3. Data segmentation for scalability design

4. Cache and Search for scalability design..

5、MySQLCluster

6. Ideas and solutions for high-availability design

7. MySQL monitoring of high availability design

04 My Review Book Information

(1) Java Interview Manual

1. Performance optimization interview column

2. Microservice architecture interview column

3. Concurrent programming advanced interview column

4. Open source framework interview questions column

5. Distributed interview column

(2) Actual documentation

1. Redis combat

2. MySQL combat

3. Spring Boot combat

4. Spring Cloud combat

5. Actual combat Java virtual machine

Take the actual combat Java virtual machine as an example:

1. A preliminary exploration of the Java virtual machine

2. Understand the basic structure of the Java virtual machine

3. Commonly used Java virtual machine parameters

4. Garbage collection concepts and algorithms

5. Garbage collector and memory allocation

6. Performance monitoring tools

7, analyze the Java heap

8. Locking and concurrency

9. Class file structure

10. Class loading system

11. Bytecode execution

(3) Java core knowledge points to organize documents

Due to space limitations, many contents only show catalogs and screenshots, which are organized in documents. Those who need these documents can be shared with everyone. I hope all programmers can learn and strive to realize our dream of being a big factory. !

Get: Like + comment, follow me, then add ↓↓↓ to take away!


 

Guess you like

Origin blog.csdn.net/Java0258/article/details/109205308