I just read an interview transcript of C ++'s csdn and said that he would record new knowledge points every day. I feel so good. Now I have already studied it, every day, almost all kinds of new problems are encountered in projects that I usually access. I spend every day focusing on these problems. It is necessary to take half an hour every day to write a knowledge summary, a quick summary of one day's work is also a kind of sorting of your own knowledge. I used to like to remember this book. However, if you don't need it for a long time, you will find it easy to forget it, so I hope I can stick to writing my blog carefully in the future.
Recently, I used vs2008 as a MySQL database query software to implement several simple query functions. Party A raised several requirements because of the large data volume, therefore, it takes a long time to query the Traversal Time. Today I set an index for the table. The index setting method is as follows:
Alter table parts add index idx_model (model );
|
Parts is the table name, idx_model is the index name, and model is the table field. Setting the index can speed up the query, and the index is equivalent to the database directory, you do not need to traverse the entire table during query. It is much faster to perform a test today.
At the same time, the MySQL database backup is also summarized. If mysqldump is used for backup, Step 1: Enter mysqldump-uroot-proot Database Name> file path (D: \ a.txt) 2. Use the task manager to stop the mysql-NT Service, delete ibdata1 and two log files, and 3. Restart the MySQL service, it will automatically create a new ibdata1 file and two log files, 4, and then use the command line: mysql-uroot-proot database name <file path (D: \ a.txt ), if the data volume is large, it takes a long time to restore the data. Another method is to copy the ibdata1 file and two log files directly, and copy the files back when they are restored. Of course, you also need to move them down when the service is closed.
Today is a good start. I hope to keep doing it every day. Come on!