Follow-up from "Add FF for SaaS GA release of Semantic Code Search"
The following discussion from !215170 should be addressed:
-
@partiaga started a discussion: (+2 comments)
Hi @Andyschoenen - would you be able to do the database maintainer review again here?
I had to rebase this over another MR, and one of the queries now have additional conditions in the
WHEREclause:WHERE "namespaces"."type" = 'Group' AND "namespaces"."parent_id" IS NULL
I found a query that returns results: https://console.postgres.ai/shared/f26fa074-6b7a-4d9a-b900-bc5fdbb1393c
I think a partial index on
namespace_settingswould be great for this queryCREATE INDEX idx_namespace_settings_on_namespace_id_and_experiment_features ON namespace_settings(namespace_id, experiment_features_enabled) WHERE experiment_features_enabled = TRUE;This improved it: https://console.postgres.ai/shared/cff638c8-9d44-4594-9ab2-7634faa85d40
However, I think this is out of scope for this MR since we were filtering for
experiment_features_enabledbefore. Let's address this in a follow-up.