Some problems encountered in MySQL pressure measurement

Source: Internet
Author: User

BULK INSERT

http://blog.csdn.net/xiaoxian8023/article/details/20155429

Mysql JDBC Batch data, need to add rewritebatchedstatements=true to JDBC connection. The default JDBC is not to turn on batch processing.

Example: Jdbc:mysql://10.250.4.98:3306/dbname rewritebatchedstatements=true

Java Updatebatchsample:

Official Website Forums

39,260053,263456#msg-263456

MySQL itself have no real "batch" API for prepared statements. If You add the configuration property "Rewritebatchedstatements=true" to your JDBC connection string for connector/j, the Driver would rewrite batches of prepared inserts into Multi-value form, and all other forms of statements into Multi-statem Ents, which does give a large performance gain (7-10x).

Attention:

JDBC driver version requires 5.1.8 and above

Some problems encountered in MySQL pressure measurement

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.