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

Increase journal insertion speed #731

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Increase journal insertion speed #731

merged 1 commit into from
Jan 13, 2023

Conversation

mxsasha
Copy link
Collaborator

@mxsasha mxsasha commented Jan 12, 2023

As the journal table is locked per #685 anyways,
we can guarantee that max(_new_serials_per_source)
is the same as running MAX(serial_nrtm) per source
after the first insert.

The MAX(serial_nrtm) query is actually really slow,
so avoiding this has significant benefits, and
reduces the cost of locking the table.

This was extracted from #718 (c8209ba).

@mxsasha mxsasha self-assigned this Jan 12, 2023
@mxsasha mxsasha added this to the Release 4.3 milestone Jan 12, 2023
@mxsasha mxsasha mentioned this pull request Jan 12, 2023
23 tasks
@mxsasha mxsasha force-pushed the faster-nrtm-insert branch 2 times, most recently from 7f372a5 to bc2c9d4 Compare January 12, 2023 20:25
As the journal table is locked per #685 anyways,
we can guarantee that max(_new_serials_per_source)
is the same as running MAX(serial_nrtm) per source
after the first insert.

The MAX(serial_nrtm) query is actually really slow,
so avoiding this has significant benefits, and
reduces the cost of locking the table.
@mxsasha mxsasha merged commit 60d7a1a into main Jan 13, 2023
@mxsasha mxsasha deleted the faster-nrtm-insert branch January 13, 2023 12:16
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.

1 participant