Ivan Yelizariev fe3e84085f [FIX] point_of_sale: speed up reading computed session fields
Context
   * postgres 12.5
   * Odoo 14

DB Stats
   * pos.payment: 645 K
   * pos.order by company: 379 K, 1 K, 973 K, 19 K

total_payments_amount
=====================

Result: 0.02 sec vs 33.6 sec

POS Session Stats:
   * pos.order: 27 K
   * pos.payment: 39 K

BEFORE

   22 33.467 0.123 (number of queries, query time, rest time)

AFTER read_group refactoring:

   4 3.952 0.006

AFTER read_group + session_id index

   4 2.770 0.009

AFTER read_group + session_id index + store company_id

   4 0.009 0.006

_compute_cash_balance
=====================

Result: 0.1 sec vs 9.2 sec

POS Session Stats:
   * pos.order: 59 K
   * pos.payment: 82 K

BEFORE
   399 1.695 7.587

AFTER
   21 0.123 0.016

_compute_picking_count
======================

Result: 0.7 sec vs 3.5 sec

POS Session stats
   * pos.order: 107 K
   * stock.picking: 60 K

BEFORE
   126 1.007 2.452

AFTER
   5 0.723 0.011

---

opw-2514640

closes odoo/odoo#73444

X-original-commit: 68bed01a73505870fb4fa41ae9cd8471d055b27f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-08 15:22:34 +00:00
2021-06-29 14:41:41 +00:00
2021-07-08 07:00:06 +00:00
2015-09-08 15:45:09 +02:00
…
2015-09-08 17:58:38 +02:00
2020-09-28 14:07:25 +00: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%