summaryrefslogtreecommitdiff
path: root/src/boot/app.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-23 00:31:53 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-23 00:42:00 -0400
commit3fab58827017041168a769184469cff3722d6c38 (patch)
tree043b49c36976a1eec8fe4306a1e88d3cc2a27e62 /src/boot/app.rs
parent6f7f4410980edd13c57ad54697ebe99d739fef76 (diff)
Make sure (most) queries avoid table scans.
I've exempted inserts (they never scan in the first place), queries on `event_sequence` (at most one row), and the coalesce()s used for event replay (for now; these are obviously a performance risk area and need addressing). Method: ``` find .sqlx -name 'query-*.json' -exec jq -r '"explain query plan " + .query + ";"' {} + > explain.sql ``` Then go query by query through the resulting file.
Diffstat (limited to 'src/boot/app.rs')
-rw-r--r--src/boot/app.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/app.rs b/src/boot/app.rs
index 1d88608..e716b58 100644
--- a/src/boot/app.rs
+++ b/src/boot/app.rs
@@ -23,7 +23,7 @@ impl<'a> Boot<'a> {
let resume_point = tx.sequence().current().await?;
let logins = tx.logins().all(resume_point.into()).await?;
- let channels = tx.channels().all(resume_point.into()).await?;
+ let channels = tx.channels().all(resume_point).await?;
let messages = tx.messages().all(resume_point.into()).await?;
tx.commit().await?;