-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Description
df.to_sql is very slow, and takes hours, when connecting to sql server using sql alchemy connection
https://github.com/mkleehammer/pyodbc/wiki/Features-beyond-the-DB-API#fast_executemany
Performance is much faster after using fast_executemany
@event.listens_for(engine_local, 'before_cursor_execute') def receive_before_cursor_execute(conn, cursor, statement, params, context, executemany): if executemany: cursor.fast_executemany = True Can enable fast_executemany in to_sql implementation for SQL Server
Metadata
Metadata
Assignees
Labels
No labels