Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0056353Openbravo ERPZ. Otherspublic2024-09-03 17:452024-09-30 12:28
malsasua 
ludmila_ursu 
highmajorhave not tried
closedfixed 
5
 
 
Core
No
0056353: Reporting: performance issue in two standard reports
the performance of two reports is not good, as they are taking more than 5min

The reports are executing these two queries:
1. https://explain.dalibo.com/plan/eac819h999d19824#query [^]
2. https://explain.dalibo.com/plan/ab9c7e2g44e1b580#query [^]
n/a
No tags attached.
Issue History
2024-09-03 17:45malsasuaNew Issue
2024-09-03 17:45malsasuaAssigned To => Triage Omni OMS
2024-09-03 17:45malsasuaModules => Core
2024-09-03 17:45malsasuaTriggers an Emergency Pack => No
2024-09-04 07:58frank_gonzalezNote Added: 0168716
2024-09-04 07:58frank_gonzalezAssigned ToTriage Omni OMS => kousalya_r
2024-09-04 08:00mtaalAssigned Tokousalya_r => Triage Omni WMS
2024-09-16 09:13mtaalAssigned ToTriage Omni WMS => ludmila_ursu
2024-09-17 22:46ludmila_ursuNote Added: 0169297
2024-09-17 22:47ludmila_ursuNote Edited: 0169297bug_revision_view_page.php?bugnote_id=0169297#r28462
2024-09-20 11:30ludmila_ursuNote Added: 0169423
2024-09-20 11:31ludmila_ursuStatusnew => feedback
2024-09-26 10:50ludmila_ursuNote Added: 0169629
2024-09-26 10:52ludmila_ursuNote Edited: 0169629bug_revision_view_page.php?bugnote_id=0169629#r28507
2024-09-26 14:51ludmila_ursuNote Edited: 0169629bug_revision_view_page.php?bugnote_id=0169629#r28509
2024-09-30 12:27ludmila_ursuNote Added: 0169755
2024-09-30 12:27ludmila_ursuStatusfeedback => scheduled
2024-09-30 12:28ludmila_ursuStatusscheduled => resolved
2024-09-30 12:28ludmila_ursuFixed in SCM revision => .
2024-09-30 12:28ludmila_ursuResolutionopen => fixed
2024-09-30 12:28ludmila_ursuStatusresolved => closed

Notes
(0168716)
frank_gonzalez   
2024-09-04 07:58   
Jira: https://openbravo.atlassian.net/browse/RM-16735 [^]
(0169297)
ludmila_ursu   
2024-09-17 22:46   
(edited on: 2024-09-17 22:47)
https://docs.google.com/document/d/1scfjt7vJWqwkMEVHvCIOFkbyj89w8RtqMk3cyQkzkIk/editConnect [^] your Google account

These topics are concerned by the 2 queries:

“Rapport Flash - Topic” and “Acomptes_New”

AHV and reports need to be recreated
- Rapport Flash (Simple)
- Rapport Flash Simple - 30 minutes
- Suivi des Acomptes

(0169423)
ludmila_ursu   
2024-09-20 11:30   
Hello,
We can add the suggested indexes, and retest performance gain in produnit server.
For this, we need the customer confirmation when the intervention can be done (max 1 hour, only the reporting server will not be available).

For applying the other changes, the topics/ahv/reports need to be recreated.
Please create a new jira for this.
(0169629)
ludmila_ursu   
2024-09-26 10:50   
(edited on: 2024-09-26 14:51)
Indexes were added by Miguel Angel yesterday in produnit.
Based on explain analyze, we see an improve of performance (results are present in the google sheet):
- first query -> from 2 to 6 times faster
- second query -> from 5 to 10 times faster.

Given these results, the second query does no longer need modification.

If needed, the first query can be simplified, to have an even better performance. For this, topic should be modified and AHV/reports should be recreated.
Please create a new issue if this is needed.

Indexes added in produnit (to be added also in production, when confirmed by the customer):

CREATE INDEX obrts_inoutline_movdate_idx ON obrts_inoutline ((movementdate::date));
CREATE INDEX obrts_paydet_docdate_idx ON obrts_payment_details ((documentdate::date));
CREATE INDEX obrts_inoutline_so_movdate_idx ON obrts_inoutline_so ((movementdate::date));
CREATE INDEX obrts_ord_mv_created_idx ON obrts_order_data_mv ((created::date));
CREATE INDEX obrts_ord_mv_org_id_idx ON obrts_order_data_mv (obrtmd_org_id);
CREATE INDEX obrts_ord_mv_docno_idx ON obrts_order_data_mv (documentno);

(0169755)
ludmila_ursu   
2024-09-30 12:27   
MR for adding indexes:
https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.tools.sales/-/merge_requests/59 [^]