Describe the suggested improvement
Is your improvement related to a problem? Please describe.
When doing outbox cleanup, a missing index (present when using SqlPersistence) results in suboptimal performance.
SqlPersistence creates an index for the Dispatched and DispatchedAt columns in the Outbox table. The Outbox cleanup process uses those columns at read time. Systems under heavy load tend to deal with large and high-throughput Outbox tables, and the cleanup process, without proper indexes, could significantly impact system performance.
Describe the suggested solution
Create the missing index.
Describe alternatives you've considered
Do nothing and document that the index can be manually created if the system requires it.
Additional Context
No response