Delayed::Backend::ActiveRecord::Job Load (0.2ms) SELECT `delayed_jobs`.`id` FROM `delayed_jobs` WHERE (((run_at <= '2023-12-02 07:44:11.604515' AND (locked_at IS NULL OR locked_at < '2023-12-02 03:44:11.604530')) OR locked_by = 'host:taketo-mac-mini.local pid:6304') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5
with mysql2 gem
Delayed::Backend::ActiveRecord::Job Update All (0.2ms) UPDATE `delayed_jobs` SET `delayed_jobs`.`locked_at` = '2023-12-02 07:38:55', `delayed_jobs`.`locked_by` = 'host:taketo-mac-mini.local pid:5826' WHERE (((run_at <= '2023-12-02 07:38:55.094096' AND (locked_at IS NULL OR locked_at < '2023-12-02 03:38:55.094099')) OR locked_by = 'host:taketo-mac-mini.local pid:5826') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
It does not optimize mysql query with trilogy gem. https://github.com/trilogy-libraries/trilogy
Expected behavior
It exec optimized mysql query with trilogy gem.
Actual behavior
with trilogy gem
with mysql2 gem