Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should be paid attention to when writing data in bulk in mysql table

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what you need to pay attention to when writing data in bulk in the mysql table, the content of the article is carefully selected and edited by the author, and it has a certain pertinence, and it is of great significance to everyone's reference. let's work with the author to understand what we need to pay attention to when writing data in bulk in the mysql table.

Recently, when bulk migration data was written to the mysql table, an error occurred.

SQLSTATE [HY000]: General error: 1390 Prepared statement contains too many placeholders. Check mysql's official website and explain: Error: 1390 SQLSTATE: HY000 (ER_PS_MANY_PARAM) Message: Prepared statement contains too many placeholders

Cause analysis:

When mysql uses PDO for writing, PDO supports a maximum placeholder of 65535.

When the table of insert has 6 columns (that is, 6 fields) and the number of rows written to the record is 11000, the total placeholder of insert is: 6x11000=66000

66000 is greater than mysql and the maximum placeholder is 65535, so mysql

Conclusion: the written data is m-column and n-row. Mendn must be less than 65535.

After reading the above about what you need to pay attention to when writing data in bulk in the mysql table, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report