Pitched foundation, look under the hood, the interview I made rocket: MySQL + JVM + 23 kinds of design patterns

01 MySQL optimization

1.1 MySQ optimization What? How to learn?

On this, for everyone to see a study outline (xmind) files, each branch there will be described in detail.

 

Here are introduced to show in picture form, if you want to download the original file, and more tuning notes (MySQL + Tomcat + JVM) direct private letter I "framework" for free download! !

1.2 on MySQL, which questions the interviewer may ask?

  • First: MySQ performance optimization best practices 21 (there are specific explanations) You know what?
  1. Optimize your query query cache
  2. EXPLAIN Your SELECT query
  3. LIMIT 1 when using a single line of data
  4. Indexed for the search field
  5. Embodiments using equivalent type Join the table at the time, and the index
  6. Do not ORDER BY RAND ()
  7. Avoid SELECT *
  8. Each table is always set an ID
  9. Use ENUM instead of VARCHAR
  10. Get advice from PROCEDURE ANALYSE ()
  11. NOT NULL use as much as possible
  12. Prepared Statements
  13. Unbuffered query
  14. The IP address is saved as UNSIGNED INT
  15. Fixed-length table will be faster
  16. Vertical split
  17. Split large DELETE, or INSERT statement
  18. The smaller of the faster column
  19. Choosing the right storage engine
  20. Using an object relational mapper (Object Relational Mapper)
  21. Caution "permanent link"

Length little long, finishing into a PDF document:

MySQ performance optimization best practices 21 (detailed explanation)

  • Second: look at MySQL's high-frequency 20 to ask (with detailed answers into a book)
  1. Affairs of the four properties (ACID) atomicity, consistency, isolation, durability?
  2. Concurrent transactions? Transaction isolation levels, each level can cause a problem, MySQL default is what level?
  3. Three common difference MySQL storage engine (InnoDB, MyISAM, MEMORY) of?
  4. MySQL's MyISAM and InnoDB two storage engines, transaction, lock level, the respective application scenarios?
  5. Query different elements (where, jion, limit, group by, having, etc.) execute the order?
  6. What is a temporary table, delete the temporary table when?
  7. MySQL B + Tree index difference between the index and Hash?
  8. sql query to determine which type of index creation? How to optimize queries?
  9. Clustered index and non-clustered index difference?
  10. What locks (optimistic locking pessimistic locking), select the time how plus exclusive lock?
  11. Non-relational databases and relational database difference, comparative advantage?
  12. Three database paradigm, according to a scene design data table?
  13. Database read and write separation, master-slave replication, master-slave replication analysis of seven questions?
  14. Use explain sql optimization and indexing?
  15. MySQL slow query how to solve?
  16. What is an inner join, outer join, cross-connect, Cartesian product, etc.?
  17. What are mysql locks, deadlocks determine principles and specific scenes, how to solve the deadlock?
  18. varchar, and char usage scenarios?
  19. mysql high concurrency environmental solutions?
  20. Recovery mechanism when the transaction database crashes (REDO UNDO logs and logs)?

MySQL asked 20 high-frequency (detailed answers)

1.3 MySQL performance tuning notes Share

  • "MySQL performance tuning and architecture - the whole book (PDF)"

The book is divided into three parts, the first part is the foundation piece, the second part is the focus of the re-tuning articles, the third part is the architectural design articles

(1) Contents Introduction

 

(2) details of the content

 

  • "Re-learn MySQL: From Novice to Professional (PDF)"

The book includes MySQL installation and configuration, database creation, create a data table, the data types and operators, MySQL functions, query data, the operation data table (insert, update, and delete data), indexed, stored procedures and functions, views, triggers, user management, data backup and recovery, logs, and performance optimization, and so on. The book focus on combat operations, to help the reader step by step to master the technique of MySQL. Need to re-learn about MySQL, you can look at this suggestion

 

02JVM Performance Tuning

2.1 JVM performance tuning and learning problem outline (xmind)

 

2.2 JVM performance tuning interview questions (attached parsing)

  1. Java class loading process?
  2. Describe the principle mechanism JVM loaded Class file?
  3. Java memory allocation.
  4. GC is the What? Why should there be GC?
  5. Description of Java garbage collection mechanism.
  6. How to determine whether an object is alive? (GC method of determination or object)
  7. Garbage collection advantages and principles. And consider two kinds of recovery mechanisms
  8. What is the basic principle is that the garbage collector? The garbage collector can immediately reclaim memory? Is there any way the initiative to inform the virtual machine garbage collection?
  9. Java memory leak will do, please describe.
  10. Deep and shallow copy copy.
  11. System.gc () and Runtime.gc () will do anything?
  12. finalize () method is invoked when? What is the purpose destructor (finalization) is?
  13. If the referenced object is set to null, the garbage collector if the object immediately release the memory occupied?
  14. What is a distributed garbage collection (DGC)? How does it work?
  15. What is the difference between serial (serial) collectors and throughput (throughput) is a collector?
  16. In Java, when an object can be recycled garbage?
  17. Description of Java memory allocation and recovery policy rates and Minor GC and MajorGC
  18. Permanent behalf of the JVM garbage collection will occur Why?
  19. The method of garbage collection in Java What?
  20. What is the class loader class loader What?
  21. Parent class loader delegation model mechanism?

JVM tuning interview Related Questions

2.3 JVM performance tuning notes Share

  • "JVM tuning summary (PDF)"

(1) Contents

table of Contents

(2) Detailed content

Detailed JVM tuning content

 

03 Insights 23 design patterns

3.1 depth analysis of 23 design patterns learning syllabus (xmind)

 

3.2 Gangster [Tsinghua graduate level writing Mashi Bing] Detailed Battle City 23 design patterns

First, the needs analysis

Battle City in our tanks and enemy tanks there, we have a tank, there are more enemy tanks. Tanks can be moved, you can be fired bullets. Our tanks may be controlled by the up and down direction keys, enemy tanks automatically change direction. There are obstacles in the game form, including brick walls, steel walls, water walls and grass. Tanks may pass through the grass, in the face of other obstacles, we stop moving the tank, and then moved by manipulating the direction changing, can automatically change the direction other obstacles encountered enemy tanks. Our tanks have three times the value of life, when the collision with the enemy tanks and enemy bullets, minus the value of life - -, when the value of life is zero, the enemy victory, the game is over. Life is the enemy tank - a, when the enemy tanks and the bullets we meet our tanks or disappeared, while our bullets disappear, resulting in an explosion. When our tanks to destroy enemy tanks after, I Fang Shengli, the game ends. An enemy bullet or bullets hit our home turf, the game ends.

Second, the program design

Object-oriented design approach, the project has the following classes:

The main form: GameForm, the main form of the game.

Tank: parent tanks (Tank), Our tanks (MyTank), enemy tanks (EnemyTank).

Wall: parent wall (Wall), brick (BrickWall), just wall (SteelWall), a wall of water (WaterWall),

Grass (MeadoeWall).

Bullet: parent bullet (Bullet), our bullet (MyBullet), enemy tanks (EnemyBullet).

Lair: Home

Spark: Spark, bullets and wall collisions generate sparks.

Explosion: Blast, with tanks and bullets lair collision explosion.

The following are 23 kinds of design patterns documents and videos, you need a small partner can look forward small series, small series of private letters "data" to obtain.

 

 

 

 

 

In Java development, project and Battle City 23 design patterns is the classic of classics, even the development of 5 years or even 10 years or more developers, and true do not say he mastered the 23 design patterns, hope we can learn from it, and be able to master the details of these things.

About the above documentation: MySQL + JVM +-depth analysis of 23 design patterns, I'm going to share with you so much to learn, do not know the interview questions you can answer was standing up not? Not does not matter, you can find small series to share the complete original (title + answer analysis)

The study also notes on "data", these learning routes and book notes like, if you do not, you can find a small series to share free download, watch free Access: Forwarding Forwarding + + private letter keyword "data "! ! !

 

Published 239 original articles · won praise 48 · views 30000 +

Guess you like

Origin blog.csdn.net/Sqdmn/article/details/105059027