magemojo / m2-ce-cron

Magento 2 cron project to fix bugs and common cron issues.
https://magemojo.com
MIT License
165 stars 45 forks source link

134 add additional index for getJobsByStatus call #135

Open JesKingDev opened 1 year ago

JesKingDev commented 1 year ago

Overview

As the cron_schedule table grows before it is cleaned, the performance of the getJobsByStatus call degrades due to a missing table index.

Resolves https://github.com/magemojo/m2-ce-cron/issues/134

Testing

Prior to pulling this down, run the following SQL against your db and notice that no index is used.

CleanShot 2023-02-26 at 12 36 08@2x

After installing, run the same query

CleanShot 2023-02-26 at 12 37 25@2x