I’ve written a piece of code which uses the python mysql connector. The issue that I’m faacing is that a simple update query is taking 4132 entries is taking extremely long time. The values are being passed through a list of tuples. Is there anyway of speeding this up?
query = 'UPDATE endorsemententries SET end_type=%s WHERE company_id=19;'
cur.executemany(query, end_type)
I tried using .execute instead. But as expected that was even slower.
New contributor
Amandeep Singh Chadha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.