Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't optimize mysql query with trilogy gem #221

Open
taketo1113 opened this issue Dec 11, 2023 · 0 comments · May be fixed by #222
Open

Don't optimize mysql query with trilogy gem #221

taketo1113 opened this issue Dec 11, 2023 · 0 comments · May be fixed by #222

Comments

@taketo1113
Copy link

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
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
@taketo1113 taketo1113 linked a pull request Dec 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant