diff options
| author | Guewen Baconnier <guewen.baconnier@camptocamp.com> | 2015-07-02 20:59:26 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-07-08 13:56:20 +0200 |
| commit | 4fe0c6bd60d3d092f69a1fec213ddcb9d5eeb8a6 (patch) | |
| tree | d8e917d3b15622ebd54462ac938094fe11d6bc70 /addons/web_editor/static/src/xml/editor.xml | |
| parent | 166839fb461ffa6ebb3969643f9231cc8d922dba (diff) | |
[IMP] account: updated index to optimize _default_get of account.move.line
A log analysis showed that the normalized query below was executed very often
with a slow explain plan using a seq scan.
```sql
SELECT move_id, date
FROM account_move_line
WHERE journal_id = <journal_id>
AND period_id = <period_id>
AND create_uid = <user_id>
AND state = 'draft'
ORDER BY id DESC LIMIT 0;
```
This query is called in the _default_get of account.move.line to find the last
unbalanced move line.
The existing index can be improved to cover this query as well, showing an
impressive improvement of the explain plan as explained here:
https://github.com/odoo/odoo/pull/7430#issuecomment-119521031
Closes #7430
Diffstat (limited to 'addons/web_editor/static/src/xml/editor.xml')
0 files changed, 0 insertions, 0 deletions
