Einstein said, “Patience and perseverance always pay off.” I have always taken that as my motto, and it has come true for me this year.

Every programmer has a big factory dream, and I am no exception. In the interview with Ant Financial last year, I was unexpectedly turned down by MySQL. I didn’t answer many relevant questions, so I felt cold after only two interviews. After returning home, I also studied hard and prepared for world War II. Now I finally entered Ant Financial and was employed.

The following shows ali interview questions (including answers), learning materials, combat documents, etc., can be shared with you for free, need friends, pay attention to the following public number can be obtained for free!

 

01 Ant Financial interview question MySQL

The previous Ali interview questions have been summarized, the specific interview questions have been organized into a document, this article is for MySQL series, so the following only show my first interview ali was asked some MySQL problems, other thematic content (including the answer) of the document, private letter I [interview] can receive.

  1. Explain the concept and key features of a relational database.
  2. What are the typical products, features and application scenarios of relational databases?
  3. Please describe the categories of SQL statements 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 feasible specific measures?
  6. A drop database SQL statement was executed by mistake.
  7. This section describes the principle of MySQL primary/secondary replication and the procedure for configuring primary/secondary replication.
  8. How does MySQL implement two-way master-slave replication and describe the application scenarios?
  9. How does MySQL implement cascading synchronization and describe the application scenario?
  10. How can I solve the primary/secondary replication failure of MySQL?

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

Ant Financial Interview technical questions:

  1. Introduce yourself.
  2. Project introduction (introduce the project first, then chat)
  3. Execution order of junit usage, before, beforeClass, after, afterClass
  4. A distributed lock
  5. Nginx request forwarding algorithm, how to configure by weight forwarding
  6. What’s wrong with using hashMap to implement Redis (deadlock, loop, ConcurrentHashmap)
  7. Thread state
  8. The way a thread blocks
  9. The difference between “sleep” and “wait”
  10. The underlying implementation of hashMap
  11. Ten thousand people grab 100 red envelopes, how to achieve (no queue), how to ensure that 2 people can not grab the same red envelopes, available distributed lock
  12. Java memory model, garbage collection mechanism, unreachable algorithm
  13. Two Integer references are passed to a swap method that swaps references within the method and returns the values of the two references to see if they have changed
  14. AOP’s underlying implementation, dynamic proxy is how dynamic, if there are 100 objects, how dynamic proxy for these 100 objects?
  15. Check whether you have used Maven install, maven test, git.
  16. How to configure docBase for Tomcat
  17. Several ways to configure Spring beans
  18. The web.xml configuration
  19. Spring’s listener.
  20. The implementation mechanism of Zookeeper, with cache, how to store the registration service
  21. Will I/O block? ReadLine is blocked
  22. Spring thread pool or Java thread pool?
  23. String formatting methods (20,21)
  24. Time formatting methods
  25. What are timers made of
  26. How does a thread exit
  27. What locks does Java have? Optimistic lock Pessimistic lock synchronized read/write lock, use reentrantlock Reentrantlock vs. Synmchronized
  28. Usage scenarios of ThreadLocal
  29. Java memory model, garbage collection mechanism
  30. Why should a thread execute a call to start instead of run?
  31. Implementation mechanism of QMQ message (QMQ is qunar’s encapsulated message queue)
  32. Three ways to traverse a HashMap
  33. Some commands for the JVM
  34. Difference between Memcache and Redis
  35. Mysql row-level lock ()
  36. How is the lock added to ConcurrentHashmap? The more sections, the better
  37. Innodb isa row lock, myISAM isa table lock.
  38. Other ways to optimize MySQL performance
  39. Where can I see Linux system logs
  40. How do I view network processes?
  41. Count the number of bits 1 in the binary representation of an integer
  42. JVM memory model, Java memory model

Answer to interview questions:

 

How did I study before World War II?

(1) MySQL

  1. What types of locks are available in Mysql?
  2. When are MYSQL tables vulnerable to corruption?
  3. What is the best field type in MySQL to record currency
  4. Does MYSQL support transactions?
  5. Explain access control lists
  6. What are generic SQL functions?
  7. What is a nonstandard string type?
  8. How many TRIGGERS are allowed in the Mysql table?
  9. What objects can be created using the CREATE statement?
  10. What’s 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 enter characters as hexadecimal numbers?
  15. How do I display the first 50 lines?
  16. .

MySQL interview question answer:

 

(2) 21 best practices for MySQL performance optimization

  1. Optimize your query for query caching
  2. EXPLAIN your SELECT query
  3. LIMIT 1 is used when there is only one row of data
  4. Build indexes for search fields
  5. Use a similar type of example when joining a table and index it
  6. Don’t ORDER BY RAND()
  7. Avoid SELECT *
  8. Always set an ID for each table
  9. Use ENUM instead of VARCHAR
  10. Get advice from PROCEDURE ANALYSE()
  11. Use NOT NULL whenever possible
  12. Prepared Statements
  13. Unbuffered query
  14. Save the IP address as an UNSIGNED INT
  15. Fixed length tables are faster
  16. Vertical segmentation
  17. Split large DELETE or INSERT statements
  18. The smaller the column, the faster it will be
  19. Select the correct storage engine
  20. Use an Object Relational Mapper
  21. Beware of permalink

 

(3) MySQL performance tuning and architecture design

  • Basic article:
  1. Introduction to MySQL
  2. MySQL Architecture Composition
  3. Introduction to MySQL Storage engine
  4. MySQL Security Management
  5. MySQL backup and restore
  • Performance Optimization:
  1. Factors that affect MySQLServer performance
  2. MySQL database locking mechanism
  3. MySQL database Query optimization
  4. MySQL database Schema design performance optimization
  5. MySQLServer performance optimization
  6. Common storage engine optimization
  • Architectural Design:
  1. Basic principles of MySQL extensible design
  2. Extensible design for MySQLReplication
  3. Scalable design for data sharding
  4. Scalable design of Cache and Search..
  5. MySQLCluster
  6. High availability design ideas and schemes
  7. MySQL monitoring in a highly available design

 

04 My review treasure book material

(1) Java interview Manual

  • Performance optimization interview column
  • Microservices Architecture interview column
  • Advanced Interview column for Concurrent programming
  • Open source framework interview questions column
  • Distributed Interview

 

(2) Actual combat documents

  • Redis of actual combat
  • MySQL of actual combat
  • Spring the Boot of actual combat
  • Spring Cloud of actual combat
  • Actual Java virtual machine

The actual Java VM is used as an example:

  1. An introduction to the Java VIRTUAL machine
  2. Understand the basic structure of Java virtual machines (VMS)
  3. Common Java VIRTUAL machine parameters
  4. Garbage collection concepts and algorithms
  5. Garbage collector and memory allocation
  6. Performance Monitoring tool
  7. Analysis of the Java heap
  8. Locking and concurrency
  9. Class file structure
  10. Class loading system
  11. Bytecode execution

 

(3) Java core knowledge points sorted out documents

 

 

Due to the limitation of space, many contents only show catalog and screenshots, which are organized in the document, need these documents, can be shared with you for free, I hope all programmers can learn up, and strive to achieve our dream of Dachang!

Information: forward + comments, pay attention to the below public number can be free to pack away oh!