Skip to content

simulation: pre-select uids in select methods when called with path=

Jérome Perrin requested to merge feat/local_build_slow_query into master

when using localBuild, path keyword is injected so search simulation movements sub-documents of the applied rule, using something like:

path=['/erp5/portal_simulation/1/2/3', '/erp5/portal_simulation/1/2/3/%']

this prevents the optimizer from choosing the best index and cause queries slower as the count of simulation movement grows.

Making a first query of matching simulation movements and injecting their uids instead of the path helps the optimizer, it selects path index for the first query and uid for the second query and both queries are instant.

Edited by Jérome Perrin

Merge request reports