Optimize batch inserts with ReWriteBatchedInserts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
Single query is more performant than batch query for large multi-insert: https://www.postgresql.org/message-id/55130DC8.2070508@redhat.com
Describe the solution you'd like
Rewrite batch queries to single query when an optional flag ReWriteBatchedInserts is set.
Additional context
Similar feature exist in pgjdbc driver: https://github.com/pgjdbc/pgjdbc/pull/491
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked pgjdbc PR #491 and PostgreSQL performance discussion first to understand the requested rewrite semantics and optional flag. No pgx files or tests are named, so locate the batch-insert path and add coverage for rewritten and unchanged queries; done means the feature works and its tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100