-
Notifications
You must be signed in to change notification settings - Fork 6
Remove useless filtring in events&actions sql #134
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
base: main
Are you sure you want to change the base?
Conversation
| pending_chain | ||
| WHERE 1=1 | ||
| ${ | ||
| // If fromAsNum is not undefined, then we have also set toAsNum and can safely query the range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are auto format.
|
|
||
| # docker-compose postgres volumes | ||
| db/ | ||
| /db/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this diff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/db will be ignored without this
| FROM | ||
| blocks b | ||
| INNER JOIN pending_chain ON b.id = pending_chain.parent_id | ||
| AND pending_chain.id <> pending_chain.parent_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not confident that this can never be true. I just don't know the Mina spec well enough. What is gained by removing this filter? Is the performance notably better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I don't think the perf would be much better. It's just this logic is very confusing here when I'm reading the code
This is confirmed by running this on a online archive db: