Skip to content

aiomysql executemany is very slow to insert #983

Answered by dodysw2
RuoCJ asked this question in Q&A
Discussion options

You must be logged in to vote

Hint, check your insert query if it matches this regex at this line:

RE_INSERT_VALUES = re.compile(

There's a logic that if the query doesn't match, it will turn executemany into individual insert queries instead of a batched one.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RuoCJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants