Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

8.0 [REF] ir.config_parameter: Reduces the number of SQL queries needed to render a typical page. #102

Open moylop260 opened 8 years ago

moylop260 commented 8 years ago

8.0-get_param without cache. 9.0-get_param with cache.

The change was applied in the following commit

Currently we have the following pgbadger result for 8.0 customer app:

- Most frequent queries (N) --------------------------------------------
Rank     Times executed     Total duration     Min/Max/Avg duration (s)     Query
9) 16,417 - 2s561ms - 0ms/2ms/0ms - select "ir_config_parameter".id from "ir_config_parameter" where ("ir_config_parameter"."key" = '') order by "ir_config_parameter"."id";
--
    Example 1: 2ms - database: openerp_test, user: root - SELECT "ir_config_parameter".id FROM "ir_config_parameter" WHERE ("ir_config_parameter"."key" = 'mail.catchall.alias') ORDER BY "ir_config_parameter"."id";
    Example 2: 0ms - database: openerp_test, user: root - SELECT "ir_config_parameter".id FROM "ir_config_parameter" WHERE ("ir_config_parameter"."key" = 'web.base.url') ORDER BY "ir_config_parameter"."id";

This commit should increase the performance of website reducing the number of times executed of this query.

The question is: Should we create a back-port to vauxoo/8.0?

moylop260 commented 8 years ago

@nhomar What do you think about?

oscarolar commented 8 years ago

Thats really nice, if it doesn't imply a lot of work this is a +1