我有以下几点:
while True:
variables are set - Each loop the variables are different.
sql = sql statement with above variables
send sql to MySQL server
我可以在上述时间的一小部分内通过MySQL控制台更新100K记录。谁能指出我正确的方向? - 谢谢
答案 0 :(得分:1)
.executemany()工作,这里我是如何将代码更改为.2-.3次,而10-12秒:
while True:
variables are set - Each loop the variables are different.
data = variables - adding to data on each loop
sql = sql statement + data
send sql as a batch
这有很大帮助:http://mysql-python.sourceforge.net/MySQLdb.html
感谢您的所有帮助。