I have 13-15MB raw files to load its data into DB, and it takes around 50-55mins to insert around 30k-35k rows using executemany with pyodbc and it worked fine but its processing time is high.
For testing the performance I tried pymssql but it is showing syntax error here
x = [('a',1),('b',2).... ] # inserting only 999 rows at a time
qry = "INSERT INTO ["+tablename+"] VALUES({}) ".format(placeholders)
cursor.executemany(qry,x)
print qry
# INSERT INTO [my_T] VALUES(?,?,?,?,?,?,?,?,?,?,?,?...)
AT executemany() it is thowing error as
Error:
Error in loadData (102, "Incorrect syntax near '?'.DB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\n"