Closed chienandalu closed 8 months ago
@rco-odoo is the original author, I was just spreading the news.
You could probably comment with an explain plan before/after. My 2 cents.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
/ocabot merge patch
/ocabot merge patch
This PR looks fantastic, let's merge it! Prepared branch 15.0-ocabot-merge-pr-875-by-pedrobaeza-bump-patch, awaiting test results.
Congratulations, your PR was merged at bf40fa0eb421354b8470192d595f413ce6169ce2. Thanks a lot for contributing to OCA. ❤️
Use
_search
so we can improve the orm query with anIN SELECT
instead of a bare set of ids.In a database with lots of products before the change:
After the change:
Query plans compared:
Using
IN (<ids>)
Using
IN SELECT
cc @Tecnativa
ping @carlosdauden @pedrobaeza
(inspired by @nseinlet performance talk ;) (https://www.odoo.com/es_ES/event/odoo-experience-2023-3735/track/performance-python-5833))