-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feat: Automate account-like optimization #6209
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: master
Are you sure you want to change the base?
Feat: Automate account-like optimization #6209
Conversation
bab38bb to
db82636
Compare
Signed-off-by: Maksim Dimitrov <[email protected]>
…flag on eligible tables Signed-off-by: Maksim Dimitrov <[email protected]>
Signed-off-by: Maksim Dimitrov <[email protected]>
Signed-off-by: Maksim Dimitrov <[email protected]>
db82636 to
544d698
Compare
lutter
left a comment
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.
Looks good, but would be nice to avoid the nameclash I noted.
| @@ -0,0 +1,35 @@ | |||
| CREATE MATERIALIZED VIEW info.table_stats AS | |||
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.
It's a little unfortunate that we already have a subgraphs.table_stats which has a completely different meaning. It might be good to use a different name here, maybe entity_version_stats, though more than happy with something else
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 guess it is true that the hardest thing in development is naming stuff :D
Removed the previous migration and added a new one with the name of the view changed to your suggestion
Signed-off-by: Maksim Dimitrov <[email protected]>
Resolves #4579
What this PR does:
info.table_statsthat aggregates statistics from pg_stats for subgraph entity tables, calculating estimated unique entities, total versions, and uniqueness ratio.is_account_likeflag. The job can be enabled by setting the following env varsGRAPH_STORE_ACCOUNT_LIKE_SCAN_INTERVAL_HOURSGRAPH_STORE_ACCOUNT_LIKE_MIN_VERSION_COUNTGRAPH_STORE_ACCOUNT_LIKE_MAX_UNIQUE_RATIO