juntossomosmais / django-outbox-pattern

A django application to make it easier to use the transactional outbox pattern
MIT License
50 stars 7 forks source link

Add unique index to message_id column for improved query performance. #24

Closed ricardochaves closed 1 year ago

ricardochaves commented 1 year ago

Hello everyone,

I have noticed that our library is currently running queries on the msg_id field, which is not indexed. This can become problematic as the message table grows larger, resulting in slower query times and increased load on the database.

To address this issue, I suggest that we create a unique index on the msg_id column. This will significantly improve query performance by reducing the amount of time it takes to search for messages, as well as minimizing the amount of resources needed by the database.