Skip to content

Don't reference Commits.BucketId and .StreamId #38

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spazmodius
Copy link
Contributor

@spazmodius spazmodius commented Jan 4, 2024

these are constant.

This PR anticipates https://github.com/versionone/Core/pull/6582

@pmamut
Copy link
Contributor

pmamut commented Jan 5, 2024

IIRC @lremedi added (some of) these predicates to induce SQL server into using a supporting index, with a vastly improved query plan

@spazmodius
Copy link
Contributor Author

Probably. If that improves performance, just think what https://github.com/versionone/Core/pull/6582 can do!

where Instance='MetaStreamSubscription' and Type='CatchupSubscriptionManager'
),
ActivityStreamCommits as (
select cast(CommitStamp as datetime) CommitStamp, CheckpointNumber, CommitSequence
from Commits
where BucketId = 'Meta' and StreamId = '1EE3982777943C1BD64B154C4B5008DC0C3815A0'
Copy link
Contributor

Choose a reason for hiding this comment

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

As Pavel mentioned, this should be tested, because without this filters I've seen poor execution plans on allstate db

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

3 participants