ktmud commented on PR #20974: URL: https://github.com/apache/superset/pull/20974#issuecomment-1208398817
I wonder if the slowness in your check permission query is because postgres did not automatically create indexes on the `sqlatable_user` table ([ref](https://stackoverflow.com/questions/970562/postgres-and-indexes-on-foreign-keys-and-primary-keys)). ``` superset_test=> \d sqlatable_user; Table "public.sqlatable_user" Column | Type | Collation | Nullable | Default ----------+---------+-----------+----------+-------------------------------------------- id | integer | | not null | nextval('sqlatable_user_id_seq'::regclass) user_id | integer | | | table_id | integer | | | Indexes: "sqlatable_user_pkey" PRIMARY KEY, btree (id) Foreign-key constraints: "sqlatable_user_table_id_fkey" FOREIGN KEY (table_id) REFERENCES tables(id) "sqlatable_user_user_id_fkey" FOREIGN KEY (user_id) REFERENCES ab_user(id) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
