cloud/bmaas: first round of indexes
These are based on inspecting the production database, and should be
enough to get us out of the woods wrt. BMDB performance.
Change-Id: Ice285f25bc1d2825a04750fc6d62ef0925b9d643
Reviewed-on: https://review.monogon.dev/c/monogon/+/1804
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/cloud/bmaas/bmdb/model/migrations/1686656942_add_indexes.down.sql b/cloud/bmaas/bmdb/model/migrations/1686656942_add_indexes.down.sql
new file mode 100644
index 0000000..5828d1d
--- /dev/null
+++ b/cloud/bmaas/bmdb/model/migrations/1686656942_add_indexes.down.sql
@@ -0,0 +1,3 @@
+DROP INDEX work_backoff@process_machine_id_idx;
+DROP INDEX sessions@session_id_deadline_idx;
+DROP INDEX machine_agent_started@agent_public_key_idx;
\ No newline at end of file