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

Improve database performance #242

Merged

Conversation

DrexHD
Copy link
Contributor

@DrexHD DrexHD commented Feb 11, 2024

Improve database performance

Previous work

This PR is based on work from @PotatoPresident , which mainly improves database insertions, by batching actions.

Lookup improvements

  • Improved lookup performance by using the previously introduced cache for conditions
  • Adding indexes to columns used in conditions (action_id, object_id, old_object_id, source and player_id)
  • Adding a composed index of x, y, z and world, which helps in ledger inspect and range lookups
  • Removed the table joins for the count checking, because they are no longer necessary with the above changes and it gives a good performance improvement

Misc features

  • Using the server user cache to lookup player uuids, to use them to lookup player conditions. This has the benefit of allowing case insensitive player names
  • Added command suggestions to sources

Due to 581abac (which was originally committed by @PotatoPresident (?)) this would require a ledger database addon update. (Because com.uchuhimo.konf is no longer relocated. There might also be other incompatible changes)

@DrexHD DrexHD requested a review from a team as a code owner February 11, 2024 17:12
Copy link
Member

@PotatoPresident PotatoPresident left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PotatoPresident PotatoPresident merged commit 24b6277 into QuiltServerTools:master Apr 9, 2024
1 check passed
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