-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Akka.Persistence.Sqlite WriteJournal should create database with indexed tuple (persistence_id, sequence_nr) #4470
Labels
Comments
Unique constraint implies a unique index: |
updated the description after a mistake on my part. |
I'd be happy to accept a PR for this - we'll also need a schema migration script that users can run though. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in SqliteQueryExecutor.cs (the Batch... as well)
the primary key is OrderingColumn, which isn't used apart from byTag queries.
at the same time , there is only a UNIQUE constraint on columns (PersistenceIdColumnName, SequenceNrColumnName) even though those columns are more often used in basic queries.
It should be evaluated whether making the tuple the clustered index of the table is an even better approach (https://www.sqlite.org/withoutrowid.html) depending on the use case, especially if one does not need the 'byTag' queries.
There are also some discrepancies between MsSql and Sqlite table schema, perhaps there are some optimizations that should be moved to sqlite (I mean the index on the sequence_nr column).
The text was updated successfully, but these errors were encountered: