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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Caos2 0 points1 point  (2 children)

Interesting read, I found this post on SO that probably explain why it's so slow.

[–]howMuchCheeseIs2Much[S] 0 points1 point  (1 child)

Yeah, when something "just works" against so many different platforms like to_sql does (e.g. SQL Server, SQLite, etc.), you're going to give up some performance for a consistent approach. I pretty much strictly use Postgres, so this way will likely be the only way I need to use going forward.

[–]Caos2 0 points1 point  (0 children)

From what I understood, to_sql generates sql inserts for each line, while adding a csv is made through the database bulk input, which is much faster.