odoo/odoo#200877
Created by fw-bot
Merged
at 9628011109180b0d32dc08ac5d365e2828245aca
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-saas-17.4-report-stock-quantity-quadratic-time-join-slow-etvi-421345-fw
- head
- 23a9460d995998562f57b2ade8d5985b7d887611
- merged
- 8 months ago by Vincent Ethan
| odoo/odoo | |
|---|---|
| saas-17.4 | #200682 |
| 18.0 | #200760 |
| saas-18.1 | #200788 |
| saas-18.2 | #200811 |
| saas-18.3 | |
| saas-18.4 | |
| 19.0 | |
| master | #200877 |
[FW][PERF] stock: CASE in JOIN on dest/final_id
We need to use either location_dest_id or location_final_id in the stock quantity report. Commit e16b3bc adds the logic for this but implements it using a CASE in the JOIN which the planner selects a nested loop based plan to accomplish (quadratic time).
Change it here to a boolean expression which can be better optimized by the query planner.
Forward-Port-Of: #200682