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

QueuedJob query using 'Implementation' column without index #143

Closed
brettt89 opened this issue Feb 18, 2021 · 1 comment
Closed

QueuedJob query using 'Implementation' column without index #143

brettt89 opened this issue Feb 18, 2021 · 1 comment

Comments

@brettt89
Copy link

The SiteTree extension, when calling 'default records' function, queries the QueuedJobDescriptor table for a ContentReviewJob. However it is doing so using the Implementation column which does not have any index associated.

https://github.com/silverstripe/silverstripe-contentreview/blob/4/src/Extensions/SiteTreeContentReview.php#L666

As the QueuedJobDescsriptor.Implementation column is a varchar(255), it is having to do a full-scan on the table when searching, this takes quite a while to perform and gets exponentially worse with the more records in this table.

E.g. A QueuedJobDescriptor table with 180k records takes over 1 minute to run this single query.

@Cheddam
Copy link
Member

Cheddam commented Feb 22, 2021

Thanks for raising this @brettt89! Unfortunately this isn't really an issue with the Content Review module, and it's certainly not solvable by this module (short of applying an extension to the QueuedJobDescriptor model to patch in an index, which definitely feels like the wrong approach.)

Since an issue addressing this has also been raised about this on the Queued Jobs module, I think we'll close this one out in favour of tackling the resolution there.

@Cheddam Cheddam closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants