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
The Supabase performance advisor reported foreign key constraints that do not have a covering index. This can cause slow joins and cascades. Adding indexes on the FK columns improves performance.
Affected objects
Run the performance advisor for the full list: Supabase MCP get_advisors with type: "performance", filter by unindexed_foreign_keys.
Example: core.account_deletions — foreign key account_deletions_requested_by_user_id_fkey without a covering index.
Remediation
For each reported table and FK column(s), add an index, e.g. CREATE INDEX CONCURRENTLY idx_<table>_<fk_column> ON <schema>.<table> (<fk_column>);
Prefer CONCURRENTLY in production to avoid long locks.
Added migration 407_index_unindexed_foreign_keys.sql with 193 indexes on FK columns from Supabase performance advisor (core, data, engagement, onet). forsured schema skipped (dropped in 400).
All indexes use IF NOT EXISTS for idempotency.
Note: Local migration up failed at an earlier migration (401 – column braingrid_sync_status missing). Once the migration chain is fixed, 407 will apply. You can also apply 407 manually against a DB that has all prior migrations applied.
Activity
thinkclay commentedon Mar 10, 2026
Done.
407_index_unindexed_foreign_keys.sqlwith 193 indexes on FK columns from Supabase performance advisor (core, data, engagement, onet). forsured schema skipped (dropped in 400).IF NOT EXISTSfor idempotency.migration upfailed at an earlier migration (401 – column braingrid_sync_status missing). Once the migration chain is fixed, 407 will apply. You can also apply 407 manually against a DB that has all prior migrations applied.fix(supabase): advisor #175 MFA config, #176 FK indexes, doc updates