Skip to content

CopyFrom appears to slow down in v5 #1410

Answered by jackc
nassibnassar asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I know there shouldn't be any significant performance changes in the copy system itself. If I had to guess I would say it is something with the UUIDs.

Here's some things to try:

  1. See if you can run the copy without the UUID columns and see if there are any observable differences in performance.
  2. pprof would probably find the culprit -- whatever it is.
  3. Make sure when you move to v5 you are also moving to the pgtype now merged into v5. The old pgtype might still work but it probably would be jumping through extra hoops.
  4. If it is the UUID, you might be want to use google/uuid or gofrs/uuid instead of strings to the UUIDs. They may be faster at parsing the string UUIDs.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nassibnassar
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants