MySql tossing Note 1: Data Import error, slow Query

Source: Internet
Author: User

In the past few days, I 've moved the QBlog of the autumn garden to Oracle and fixed several bugs. Then I added some indexes to improve the running performance.

Then I put the autumn garden on MySql and ran around it. I found a lot of problems. I would like to record it:

 

1: Data Import: several data import tools are used on the Internet. Whether used, Navicat for mysql is used to export data.

Tens of thousands of article data cannot be exported:

I. character set mismatch, data import often fails, and the character type of my. ini is changed from gbk to uft8. Solution: character-set-server = utf8

2. Incompatible types. If the Bit type of Access is exported to the int type of mysql, the too long error is returned.

3: there are too many special characters in the document, and there will always be some loss of tool export data.

4. modify my. ini of Mysql. Modify: max_allowed_packet = 16 M. The default value is 1 M. When the article is about 1 M, it cannot be exported. Just change it to a larger value.

Therefore, CYQ. Data provides the batch Data import function, which is very powerful. Later, Data can be exported under Access, mysql, sqlite, oracle, mssql, and other databases.

 

2: Default Configuration: Slow query speed

Problem:

Any two-Table link + subquery will take dozens of seconds, and it seems useless. So it has been a long time in terms of syntax and statement optimization, finally, the server was opened for a large number of users to perform tests, and finally found that the essence was the configuration item problem.

Solution:

Modify mysql's my. ini configuration text: innodb_log_buffer_size = 256 M or above 512M or other values, and the speed will go up.

Unfortunately, the newly purchased vps only has 300 MB of memory. After the system is installed, Mb is used, and MB is opened for mysql. The memory will be used up, and other tasks will not be run, so we have to stop running mysql.

We are going to take the autumn garden to SQL 2000 for a lap.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.