Skip to content
Snippets Groups Projects
Commit d7ea47f4 authored by Stanislas Sobieski's avatar Stanislas Sobieski Committed by Arnold Moyaux
Browse files

[FIX] purchase_stock: add index on created_purchase_line_id of stock.move


EXPLAIN ANALYZE SELECT "stock_move".id
FROM "stock_move"
WHERE ("stock_move"."created_purchase_line_id" in (24065, 24066, 24081, 24082, 24083, 24084, 24085, 24086, 24087, 24088, 24089, 24090, 24091, 24092, 24093, 26121, 26487)) and ("stock_move"."company_id" in (1))
ORDER BY "stock_move"."sequence" ,"stock_move"."id" ;
Goes from 2231.021 ms to 1ms on a database with 2.800.000 stock_move.

closes odoo/odoo#100035

Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
parent 55fbbfc2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment