Odoo & Postgres

Odoo 16+ and PostgreSQL

If you host Odoo 16, 17 ... on your own server or locally and you encounter huge slowdowns on trivial operation such as tree view display make sure you PostgreSQL version is higher or equal to 14.0.

In this version Postgres introduces optimizations for Postgres that can have a huge impact on Odoo. Specially when working with database with 100K products.

Since 16.0, translations are stored directly in JSON format in the name of the record, or any field that is translatable. 

On a 100K product database, with multiple languages activated (or which has been activated), the mere search of a product inside the Sale Order Lines could take ages.

For information, Odoo.sh currently uses PosgreSQL 14.9 with Odoo 16.

EDIT: the problem is as well coming from the default cache size of postgresql as Odoo uses "select" of "not in select" which basically stores ID in a postgres 4Mo cache allowing for an number of product of max 131072.

B. 

Launching an IT and Odoo Development Solutions Blog