spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Improving ProcessSendgridWebhookJob with extra mysql index #249

Closed electronick86 closed 3 years ago

electronick86 commented 3 years ago

Hello,

I discovered (thanks Horizon) that the job ProcessSendgridWebhookJob tooks sometimes 3 seconds.

executing a show processliston the mysql server, realized that there was a lot of request with the pattern :

select * from `mailcoach_sends` where `uuid` = '0cf9ca26-40fd-4b11-a718-1917be9e6044' limit 1;

testing this request tooks 3 seconds.

I created an index on the column mailcoach_sends.uuid and the seepds instantly increased.

Horizon_-_Metrics

Do you thing that index should be used on every Mailcoach?

freekmurze commented 3 years ago

That's a good suggestion. I've added this by default on v3, which will be released this week.