Improve BulkInsert Performance

49 views Asked by At

I'm loading data from csv file to database of SQL Server using python code

here is my code snippet

sql = " BULK INSERT " + str(tbl_name) + "  FROM '" + fl_path + "' WITH (FIRSTROW = 2,FIELDTERMINATOR='',ROWTERMINATOR = '\r\n',CODEPAGE = '65001'); "
engine.execute(text(sql).execution_options(autocommit=True))

this take 1 minute for 1GB of file to insert into database... Can anyone suggest me how to improve the performance of Bulk Insert or any other way to insert data which is faster than Bulk Insert

0

There are 0 answers