Closed GabeVillalobos closed 2 weeks ago
This PR has a migration; here is the generated SQL for src/sentry/migrations/0710_create_tombstone_indexes.py
()
--
-- Alter field object_identifier on controltombstone
--
CREATE INDEX CONCURRENTLY "sentry_controltombstone_object_identifier_26410aca" ON "sentry_controltombstone" ("object_identifier");
--
-- Alter field table_name on controltombstone
--
CREATE INDEX CONCURRENTLY "sentry_controltombstone_table_name_8ab879b2" ON "sentry_controltombstone" ("table_name");
CREATE INDEX CONCURRENTLY "sentry_controltombstone_table_name_8ab879b2_like" ON "sentry_controltombstone" ("table_name" varchar_pattern_ops);
--
-- Alter field object_identifier on regiontombstone
--
CREATE INDEX CONCURRENTLY "sentry_regiontombstone_object_identifier_fe50d85d" ON "sentry_regiontombstone" ("object_identifier");
--
-- Alter field table_name on regiontombstone
--
CREATE INDEX CONCURRENTLY "sentry_regiontombstone_table_name_8bba6edb" ON "sentry_regiontombstone" ("table_name");
CREATE INDEX CONCURRENTLY "sentry_regiontombstone_table_name_8bba6edb_like" ON "sentry_regiontombstone" ("table_name" varchar_pattern_ops);
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 79.84%. Comparing base (
aff9a15
) to head (7d4a496
). Report is 13 commits behind head on master.
Closing this since we already have a compound index. I ran query planner before and after adding these indexes and validated that they won't affect our current queries in any meaningful way 😞
Adds indexes to tombstone columns that are now used in cross-db queries.