java senior notes section

Have you ever used Linux ? What do you do with it?

Linux is a long-running relatively stable operating system, we generally use it as a server.

Talk about linux Here are some commonly used commands?

Pwd   Get the current path

Cd Jump to catalog

Su - u switch to an administrator

Ls-ls lists directory

What are you using to connect to remote Linux server?

Use Xshell , PuTTY such as ssh to connect to the server using a client xFTP , WinSCP and other sftp client to upload and present files. Connection and upload, download servers must rely on SSH , SFTP service, which is linux server needs to start these two services.

You have not used the Cloud Hosting?

Not used, but understand.

Cloud Hosting is the remote server functionality, developers or companies can hire only pay on demand the corresponding server.

Have not done the things that optimization of the database ?

 Done mysql database optimization, similar to other databases

Positioning: search, locate slow query

Find slow queries and locate the slow query?

   In the project before transfer test, self-inspection program started in mysql open the database query slow, and the slow implementation of the statement written to the log, after a certain time of operation. Find the slow queries by looking at the log.

Database Optimization of follow paradigm?

The first paradigm: the column can not be divided, ensuring atomicity of each column.

The second paradigm: entirely dependent on the primary key attribute.

Third Pattern: attribute does not depend on other non-primary property

Select the appropriate storage engine

myisam / innodb/ memory

Q MyISAM and INNODB difference of ( mainly )

1. Transaction Security  myisam does not support transactions and innodb support

2. query and add speed  myisam do not support transactions do not consider synchronization lock, find and add and add faster

3. support for full-text indexing  myisam support innodb not supported

4. The lock mechanism  myisam support table lock and innodb support line lock ( affairs )

The foreign key MyISAM does not support foreign keys, INNODB support foreign keys . ( Usually foreign key is not provided, to ensure that data consistency is typically in the program )

Optimization of the database to create the appropriate index ?

Index ( Index) to help DBMS efficiently get the data structure of the data .

Category: general index / unique index / primary key index / full-text index

Index use tips?

Specific Skills:

1.  For multi-column indexes created ( composite index ) , the first part is not used will not use the index.

2. For like the query, the query if it is '% aaa ' will not be used to index and ' aaa% ' will be used to index.

3.  require the use of all fields , you must be able to use when used alone index .

4.  If the column type is a string, it must be used in quotes in the condition data. Otherwise, do not use the index .

5.  If mysql estimated using the full table scan faster than using the index, the index is not used.

Index malpractice

1. take up disk space .

2. to dml ( insert, update, delete ) affecting operation, slow .

scenes to be used:

a: certainly where conditions are often used , if not the query does not make sense

b: the content of the field is not only several values (Sex)

c: field content is not frequently change .

Database optimization of the points table?

Sub-table is divided into horizontal ( row ) sub-table and a vertical ( columns ) sub-table

Optimizing the isolated read and write database

The final database will persist data to disk, if the cluster must ensure that the data for each database server that has been in. Operation can change the data in the database are to write to the master database , and other databases to synchronize data from the primary database.

Optimization of database cache

  In the persistence layer (dao) and database (db) add a caching layer between, if the data is already cached user access, obtain directly from the cache when the user visits, without accessing the database. The cache memory is in operation level, fast access speed.

Role: pressure reducing database server, reducing access time.

Java commonly used buffers,

   . 1 , Hibernate secondary cache.

2. You can use redis as a central cache.

 jdbc bulk insert realize how millions of data?

1 , change multiple submissions for the first time

2 , using batch operation

There are not used redis? Redis what is  

key-value of nosql database

Mainly used for data caching database and web as a central cache to store the cluster seesion

Guess you like

Origin www.cnblogs.com/bianshiguang/p/10990020.html