RAS-1867 Re-implement My Messages to make query more performant#472
Conversation
|
/deploy wilkia |
|
Deploying to dev cluster with following parameters:
|
matthew-robinson-ons
left a comment
There was a problem hiding this comment.
Tested multiple message scenarios. Labels are consistently displayed as before, attaching to the correct actor. Messages move in and out of my messages as before based on which internal user replied most recently. It's hard to comment on the performance of the queries without having anything to compare it against, we only really have that information in PROD currently.
The pagination object is displaying the messages on the page in a different order, previously it was showing the most recent (last sent) messages first.
matthew-robinson-ons
left a comment
There was a problem hiding this comment.
Happy with this. All looks good to me.
What and why?
This PR improves performance for internal thread retrieval (
My Messages), removes unused functionality, rationalises the query logic, and adds coverage for previously untested paths.Performance
Before
When the
My Messagestab was selected, we queried thesecure_messagetable first and performed operations such as determining the latest message before joining to thestatustable, without index.This resulted in unnecessary scanning and processing of large datasets before pagination was applied, causing poor performance for users with a high message volume.
Now
The query flow has been reversed for internal users using my_messages:
statustable first using actor-based filterssecure_messageusing the indexedmsg_idLIMITandOFFSETare used to paginate efficiently at the database levelAdditional changes
How to test
Deploy this branch and test a variety of thread and filtering scenarios. Suggested checks:
My MessagesMy MessagesJira