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

🚀perf: optimize bulk inserts in history repository #83

Merged

Conversation

yanosea
Copy link
Owner

@yanosea yanosea commented Jan 24, 2025

  • replace multiple single inserts with bulk insert using VALUES clause
  • improve performance by reducing number of database calls
  • calculate IDs for inserted records using first ID and offset
  • add empty slice check to avoid unnecessary database calls
  • update comment to reflect multiple records insertion

- replace multiple single inserts with bulk insert using VALUES clause
- improve performance by reducing number of database calls
- calculate IDs for inserted records using first ID and offset
- add empty slice check to avoid unnecessary database calls
- update comment to reflect multiple records insertion
@yanosea yanosea linked an issue Jan 24, 2025 that may be closed by this pull request
4 tasks
@yanosea yanosea marked this pull request as draft January 24, 2025 07:05
@yanosea yanosea self-assigned this Jan 24, 2025
@yanosea yanosea added the enhancement New feature or request label Jan 24, 2025
@yanosea yanosea force-pushed the 82-optimize-history-repository-performance-with-bulk-insert branch from a52b38f to b72a89d Compare January 24, 2025 07:08
@yanosea yanosea marked this pull request as ready for review January 24, 2025 07:11
@yanosea yanosea merged commit f8ae299 into main Jan 24, 2025
6 checks passed
@yanosea yanosea deleted the 82-optimize-history-repository-performance-with-bulk-insert branch January 24, 2025 07:19
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

Successfully merging this pull request may close these issues.

optimize history repository performance with bulk insert
1 participant