Comment 52 for bug 1918145

Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

> On your notes about the non-use of the index leading to the slowness - that is the crux of the problem here. If you look at LEDUC's former comments in this bug, there was mention of FORCE INDEX fixing the problem in some cases (I was unable to replicate a fix in Percona MySQL 5.7, though).

It's basically the point, looks like if we remove the index on object_id MySQL will use a different approach to build and execute the query which looks to significantly improve performance without the need of changing everything. from 6s to 1s.

> Going back to existing use cases of the code - I do not think removing the filter for project_id is a viable solution because it breaks existing use cases of query_with_hooks. It may make it faster, yes, but the question becomes how do we fix it without breaking existing use cases? (or, am I missing something -- if you have any code/patch to share that you'd like tested, I am more than glad to test).

I'm not saying we should remove this filter. Just mentioning that removing it improves performance. From 1s to 0.05s looks like we should investigate the reason of that slowness.