Commit d85234a
refactor: optimize heartbeats MongoDB indexes
Replace two separate indexes (owner_1_timestamp_-1, user_id_1) with a single
compound index {user_id: 1, owner: 1, timestamp: -1} that covers all query
patterns. Old indexes are dropped automatically on startup.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 2bc05d0 commit d85234a
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | | - | |
111 | | - | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
0 commit comments