Fabien Pinckaers 1569100baa [IMP] account: index on account.move.line to open journal items
Opening journal items does a query similar to
```sql
  SELECT
       "account_move_line".id
       FROM "account_move_line"
       LEFT JOIN "account_move" AS "account_move_linemove_id" ON ("account_move_line"."move_id" = "account_move_linemove_id"."id")
  WHERE
       ORDER BY "account_move_line"."date" DESC,"account_move_line"."move_name" DESC,"account_move_line"."id" ,"account_move_line"."id" LIMIT 80
```

Indexes on `date` weren't used in such queries. Building a compound index that includes
`id` changes the index cost computation, and allows a Index Only Scal. So, it does not
have to jump on data pages anymore to retrieve the ID of rows.

Without that, postgresql will use a Seq Scan.  It went from 10s to 5ms in our production
database, to open the list of journal items.

Part-of: odoo/odoo#99795
2022-09-08 12:46:50 +02:00
2022-08-30 08:18:53 +02:00
2022-09-08 12:46:50 +02:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%