Skip to content

Conversation

@sandhose
Copy link
Member

@sandhose sandhose commented Apr 10, 2025

This adds a new index for each foreign key in the database.

One trick is that we need those indexes to be created concurrently, which needs to be done outside of a transaction.
To do so, every single statement has to be in its own file, starting with -- no-transaction.
This is a known limitation of sqlx

It also adds two missing indexes: on the emails and on the recovery tickets.

Fixes #4370

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 10, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c861856
Status: ✅  Deploy successful!
Preview URL: https://1a9ca8be.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-fk-indexes.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose merged commit 150be9b into main Apr 14, 2025
21 checks passed
@sandhose sandhose deleted the quenting/fk-indexes branch April 14, 2025 14:03
@sandhose sandhose added T-Defect Something isn't working A-Scaling Related to performance and scaling labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Scaling Related to performance and scaling T-Defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing database indexes on foreign keys

2 participants