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

#1190 add index on delivery_id to prevent slow queries #1191

Merged
merged 1 commit into from
Aug 8, 2021

Conversation

commercewerft
Copy link

Background is a shopware 6.4 installation. We have 3.4 million entries in the mysql table enqueue.

A query like: DELETE FROM enqueue WHERE delivery_id = '1ea18942-283b-4cfd-a24a-1bf9917a9d0f'

takes 20-60 seconds. CPU load is by 100%. So this provides a race condition as the enqueue-table is growing fast and deleting entries is very slow.

Creating directly in mysql an index on delivery_id solves the problem. Queries are again done in milliseconds.

@makasim makasim merged commit 3880257 into php-enqueue:master Aug 8, 2021
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 this pull request may close these issues.

2 participants