Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037834 | Openbravo ERP | 02. Master data management | public | 2018-02-05 15:53 | 2018-03-09 15:18 |
|
Reporter | JONHM | |
Assigned To | AtulOpenbravo | |
Priority | high | Severity | major | Reproducibility | always |
Status | scheduled | Resolution | open | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037834: Performance issue in Create Invoices From Orders window |
Description | Create Invoices From Orders process takes too long to load (2719689.500 ms) in environments with high amount of data |
Steps To Reproduce | - Open window "Create Invoices From Orders"
It takes 2719689.500 ms to load |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | create_invoices.sql (23,533) 2018-02-05 16:24 https://issues.openbravo.com/file_download.php?file_id=11527&type=bug create_invoices_test_plan (20,107) 2018-02-05 16:24 https://issues.openbravo.com/file_download.php?file_id=11528&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2018-02-05 15:53 | JONHM | New Issue | |
2018-02-05 15:53 | JONHM | Assigned To | => Triage Finance |
2018-02-05 15:53 | JONHM | File Added: generate_invoices.sql | |
2018-02-05 15:53 | JONHM | Modules | => Core |
2018-02-05 15:53 | JONHM | Resolution time | => 1519599600 |
2018-02-05 15:53 | JONHM | Triggers an Emergency Pack | => No |
2018-02-05 15:53 | JONHM | File Added: generate_invoices_test_plan | |
2018-02-05 15:56 | JONHM | Summary | Create Invoices From Orders process takes too long to load => Performance issue in Create Invoices From Orders window |
2018-02-05 16:12 | jfrances | Issue Monitored: jfrances | |
2018-02-05 16:24 | JONHM | File Deleted: generate_invoices.sql | |
2018-02-05 16:24 | JONHM | File Deleted: generate_invoices_test_plan | |
2018-02-05 16:24 | JONHM | File Added: create_invoices.sql | |
2018-02-05 16:24 | JONHM | File Added: create_invoices_test_plan | |
2018-02-06 11:20 | dmiguelez | Assigned To | Triage Finance => collazoandy4 |
2018-02-12 20:37 | collazoandy4 | Status | new => scheduled |
2018-02-15 17:52 | collazoandy4 | Note Added: 0102449 | |
2018-02-15 17:53 | collazoandy4 | Note Added: 0102450 | |
2018-02-16 17:19 | collazoandy4 | Note Edited: 0102450 | bug_revision_view_page.php?bugnote_id=0102450#r16729 |
2018-02-21 06:17 | AtulOpenbravo | Assigned To | collazoandy4 => AtulOpenbravo |
2018-03-09 15:18 | vmromanos | Resolution time | 1519599600 => |
2018-03-09 15:18 | vmromanos | Note Added: 0103140 | |
2018-03-09 15:18 | vmromanos | Type | defect => design defect |
Notes |
|
(0102449)
|
collazoandy4
|
2018-02-15 17:52
|
|
Test Plan
Go to Sales Order and create three new records:
1. Business Partner: Alimentos y Supermercados, S.A, Invoice Terms: Immediate, Product: Agua sin Gas 1L, Ordered Quantity: 5
2. Business Partner: Hoteles Buenas Noches, S.A., Invoice Terms: After Delivery, Product: Zumo de Pera 0,5L, Ordered Quantity: 6
3. Business Partner: Restaurantes Luna Llena, S.A., Invoice Terms: After Order Delivered, Product: Zumo de PiƱa 0,5L, Ordered Quantity: 7
Go to Goods Shipment window and create a new record:
Business Partner: Hoteles Buenas Noches, S.A.
Create Lines From the previous order created
Edit the line created Movement Quantity: 3
Complete the shipment
Create another record in Header tab:
Business Partner: Restaurantes Luna Llena, S.A.
Create Lines From the previous order created
Complete the shipment
Open Create Invoices from Orders window and check 3 records are shown (one for each busines partner)
Set From Date: Tomorrow and check no record is shown
Set From Date: Yesterday and To Date: Today and check three records is shown
Check Lines Include Taxes: Y and check Total Gross = Total Lines |
|
|
(0102450)
|
collazoandy4
|
2018-02-15 17:53
(edited on: 2018-02-16 17:19) |
|
With the changes made the execution query cost was reduce from 17724248.29 to 944005.29
|
|
|
|
Moved to design defect:
Here we have several problems that affects the performance:
1. In customer environment we have 6M candidate order lines to be invoiced, which results in 191K records to be shown in the window. This crashes the browser when rendering the records because it clearly exceeds the purpose of this manual window. Another process should be used instead to manage such a big number of records.
2. The process is based on the C_Invoice_Candidate_V view and, on top of it, it runs a query that joins with other tables and implements some logic. Problem of this approach is that indexes are not as powerful as having everything in just one query. This situation, and the extremely high number of order lines pending to be invoiced, creates a bottleneck when executing the query.
The way to fix it would be to write a separate query without using the view. However this is not a good idea because right now everything related to pending invoicing is centralized in C_Invoice_Candidate_V view.
|
|