Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use psql /copy instead of psycopg2 copy_expert() #131

Open
jqnatividad opened this issue Jan 24, 2024 · 1 comment
Open

Use psql /copy instead of psycopg2 copy_expert() #131

jqnatividad opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jqnatividad
Copy link
Contributor

jqnatividad commented Jan 24, 2024

psql /copy is MUCH faster than psycopg2 copy_expert()

Inserting a 50mb CSV file took all of 2 seconds for psql /copy and 215 seconds for psycopg2 copy_expert - 100x faster, 2 orders of magnitude faster on the same machine!

We're calling several CLI commands already - qsv, iconv, file & uchardet - might as well add psql to the mix.

@jqnatividad jqnatividad added the enhancement New feature or request label Jan 24, 2024
@tino097 tino097 self-assigned this Mar 27, 2024
@jqnatividad
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants