You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#28394 introduced the upgrade_catalog_perms which makes a full scan of the query table which can contains millions of rows in some organizations. There are two main problems:
1 - We query for the id and database_id for all query rows to later set the catalog for each row instead of just submitting an UPDATE statement directly.
2 - This is function is invoked from different migrations which executes the full scan of the query table multiple times. Ideally, we would try to merge these migrations given how critical the query table is.
How to reproduce the bug
Use superset db upgrade to run any of the following migrations which use upgrade_catalog_perms:
Bug description
#28394 introduced the
upgrade_catalog_perms
which makes a full scan of thequery
table which can contains millions of rows in some organizations. There are two main problems:1 - We query for the
id
anddatabase_id
for allquery
rows to later set thecatalog
for each row instead of just submitting anUPDATE
statement directly.2 - This is function is invoked from different migrations which executes the full scan of the
query
table multiple times. Ideally, we would try to merge these migrations given how critical thequery
table is.How to reproduce the bug
Use
superset db upgrade
to run any of the following migrations which useupgrade_catalog_perms
:Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: