5468e41a4dadd3f5e223756fb91e2a0456063332
This follows upe045e76e35. Change the heuristics for ordering columns, as padding is not determined by column size, but by column alignment inside a row. Because in Odoo a row always starts with a column of size 4, the following columns should be the ones aligned on 4 bytes, then the ones aligned on 1 byte, then the ones aligned on 8 bytes. The analysis in the commit message ofe045e76ewas not correct, as it did not take into account the fact that rows themselves are aligned on 8 bytes. So we have: before each row used 40 bytes (+24b header) attname | typname | typlen -------------+-----------+-------- id | int4 | 4 create_uid | int4 | 4 create_date | timestamp | 8 write_uid | int4 | 4 -> 4 bytes padding write_date | timestamp | 8 active | bool | 1 -> 7 bytes padding After each row uses 32 bytes (8 bytes saved per row): attname | typname | typlen -------------+-----------+-------- id | int4 | 4 create_uid | int4 | 4 write_uid | int4 | 4 active | bool | 1 -> 3 bytes padding create_date | timestamp | 8 write_date | timestamp | 8 Of course, when more columns are present, the space savings depend on the alignment of the other columns. closes odoo/odoo#88084 Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%