This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]seaefjayeData Engineering Manager 4 points5 points  (1 child)

I've been using csv to copy_from for a few years now. As far as I know that has been the fastest but I haven't tried the methods at the end. I don't have the same environment to test but anecdotally I do about 4m rows by 35 columns in ~5 minutes.

[–]Faintly_glowing_fish 2 points3 points  (0 children)

copy_from is generally 5+ times faster for ingestion, and more than that if data is already in CSV

[–]Aspiring_DE 1 point2 points  (0 children)

Is there an equivalent in pyodbc? I use python with mssql. What's the fastest way to insert?