-
I used aiomysql executemany to insert over 800 pieces of data, which took over thirty seconds, but pymysql only took over two seconds。 |
Beta Was this translation helpful? Give feedback.
Answered by
dodysw2
Feb 5, 2025
Replies: 1 comment
-
Hint, check your insert query if it matches this regex at this line: Line 19 in 83aa96e There's a logic that if the query doesn't match, it will turn executemany into individual insert queries instead of a batched one. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
RuoCJ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hint, check your insert query if it matches this regex at this line:
aiomysql/aiomysql/cursors.py
Line 19 in 83aa96e
There's a logic that if the query doesn't match, it will turn executemany into individual insert queries instead of a batched one.