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

DB improvements #34

Merged
merged 2 commits into from
Mar 12, 2019
Merged

DB improvements #34

merged 2 commits into from
Mar 12, 2019

Conversation

boekkooi-fresh
Copy link
Contributor

This PR improves:

  • the projector query to have a lower cost
  • To only use a transaction when inserting events when need

This reduces the query cost for posgres from 16 to 8
By not starting a DB transaction for a single insert query we nicely speedup the insert speed.
@boekkooi-fresh boekkooi-fresh merged commit 5567b32 into master Mar 12, 2019
@boekkooi-fresh boekkooi-fresh deleted the patch/query-optimize branch March 12, 2019 14:35
@codecov
Copy link

codecov bot commented Mar 12, 2019

Codecov Report

Merging #34 into master will decrease coverage by 0.01%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
- Coverage   45.12%   45.11%   -0.02%     
==========================================
  Files          37       37              
  Lines        2245     2250       +5     
==========================================
+ Hits         1013     1015       +2     
- Misses       1201     1203       +2     
- Partials       31       32       +1
Impacted Files Coverage Δ
driver/sql/postgres/eventstore.go 78.91% <0%> (-1.46%) ⬇️
driver/sql/postgres/projector_aggregate_storage.go 42.17% <100%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update decc4e0...987e142. Read the comment docs.

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

Successfully merging this pull request may close these issues.

2 participants