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

Create an index for the 'state' field of the 'synolia_scheduled_commands' table #85

Open
developerlover opened this issue Jul 3, 2023 · 1 comment

Comments

@developerlover
Copy link

developerlover commented Jul 3, 2023

I'm getting slow queries report from Mysql because of the lack of an index for the "state" field.

The query that is reported is the following:

SELECT t0.id AS id_1, t0.name AS name_2, t0.command AS command_3, t0.arguments AS arguments_4, t0.executed_at AS executed_at_5, t0.last_return_code AS last_return_code_6, t0.log_file AS log_file_7, t0.command_end_time AS command_end_time_8, t0.created_at AS created_at_9, t0.state AS state_10, t0.timeout AS timeout_11, t0.idle_timeout AS idle_timeout_12, t0.owner_id AS owner_id_13 FROM synolia_scheduled_commands t0 WHERE t0.state = 'waiting';

Thank you!

@oallain
Copy link
Member

oallain commented Jul 4, 2023

Hello @developerlover ,

Thank you for reporting this issue. We'll look that asap.
If you don't need huge history you can use the purge history command to easy clean up history.

Regards

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

No branches or pull requests

2 participants