Skip to content
Snippets Groups Projects
Commit 7586194e authored by Joren Van Onder's avatar Joren Van Onder
Browse files

[IMP] account: create an index on account.move.statement_line_id

account.bank.statement.line has a journal_entry_ids field which is a o2m
to account.move. During confirmation of bank
statements (button_confirm_bank()) this o2m field is heavily used. When
a database has a lot of account.move records this lookup starts taking
up quite a bit of time. As an example, on a locally duplicated customer
database with ~700000 account.move records attempting to resolve
journal_entry_ids of an account.bank.statement.line record was observed
to take > 1 second. This index improves it to be < 5 milliseconds.

This is especially important when big POS sessions have to be closed,
because those will contain a lot of account.bank.statement.line records.

opw-665309
parent 48639d48
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment