-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ui: show data when max size reached for schema insight #97312
Conversation
71efe32
to
68a3517
Compare
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.
Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)
pkg/ui/workspaces/cluster-ui/src/api/schemaInsightsApi.ts
line 159 at r1 (raw file):
CROSS JOIN cs WHERE t.database_name != 'system' AND ti.index_type != 'primary') WHERE unused_interval > interval_threshold;`,
Can we add a order by based on the number of reads from the index_usage_statistics
? That way the most impactful indexes should always be included even if the max size is hit.
Previously, when the sql api returned a max size reached error, we were just showing the error, but not the data that was also being returned. This commit updates the Insights Schema page with the new behaviour. The query to retrieve the drop recommendations was returning all indexes and the ui was doing the filtering. This commit also changes the query to only return the indexes with a drop recommendation, resulting in a lot less data being sent with the sql api and causing less size limit reached. Then the ui just needs to decided the type of drop. Part Of: cockroachdb#96184 Release note (ui change): Still show data on the console (with a warning) for Schema Insights when we reach a "max size exceed" error from the sql api.
68a3517
to
b44ec53
Compare
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @j82w)
pkg/ui/workspaces/cluster-ui/src/api/schemaInsightsApi.ts
line 159 at r1 (raw file):
Previously, j82w (Jake) wrote…
Can we add a order by based on the number of reads from the
index_usage_statistics
? That way the most impactful indexes should always be included even if the max size is hit.
done
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @maryliag)
TFTR! |
Build succeeded: |
Previously, when the sql api returned a max size reached error, we were just showing the error, but not the data that was also being returned.
This commit updates the Insights Schema page
with the new behaviour.
The query to retrieve the drop recommendations was returning all indexes and the ui was doing the filtering. This commit also changes the query to only return the indexes with a drop recommendation, resulting in a lot less data being sent with the sql api and causing less size limit reached. Then the ui just needs to decided the type of drop.
Part Of: #96184
Release note (ui change): Still show data on the console (with a warning) for Schema Insights when we reach a "max size exceed" error from the sql api.