Skip to content

Table enqueue slow because of missing index on delivery_id #1190

Closed
@commercewerft

Description

@commercewerft

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.

I think, there should be added an index on delivery_id in enqueue/dbal/DbalContext.php

enqueue_slow_queries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions