Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0056426
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminorhave not tried2024-09-10 16:012024-10-04 16:19
Reporterwilliam_vermerschView Statuspublic 
Assigned Tokousalya_r 
PrioritynormalResolutionfixedFixed in VersionPR25Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0056426: Computed column in Financial Account screen is not optimized (screen is taking a long time to load)

DescriptionThe column "last reconciliation balance" is making the screen really long to load when you have a lot of reconciliations linked to you financial accounts.
Steps To ReproduceHave a lot of reconciliations on one (or more) financial accounts.
Go to the Financial Account screen.
Proposed SolutionIt seems that using the "HAVING" in the query computing the value is the cause of the issue (column "9DA1E5CA5A25476C9764CCBEC70E3E36").

Original query:

select
      max(rec.endingbalance)
    from
      fin_reconciliation rec
    where
      rec.fin_financial_account_id = fin_financ0_.fin_financial_account_id
      and exists (
        select
          1
        from
          fin_reconciliation fr
        where
          fr.processed = 'Y'
          and fr.fin_financial_account_id = fin_financ0_.fin_financial_account_id
        having
          rec.dateto = max(fr.dateto)
      )

Potential optimization (running in ms, instead of s):

select
      max(rec.endingbalance)
    from
      fin_reconciliation rec
    where
      rec.fin_financial_account_id = fin_financ0_.fin_financial_account_id
      and rec.dateto = (
        select
          max(fr.dateto)
        from
          fin_reconciliation fr
        where
          fr.processed = 'Y'
          and fr.fin_financial_account_id = fin_financ0_.fin_financial_account_id
      )

I checked in production (for our Weldom customer) and the result were the same for the 2 queries, the first one was taking more than 4 minutes and the second one less than one second.

I'm not sure at 100% that the 2 queries are identical, I'll let you review if it can be an accepted solution.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0169851)
jonae (developer)
2024-10-01 15:35

Jira - https://openbravo.atlassian.net/browse/RM-17842 [^]
(0169948)
hgbot (developer)
2024-10-03 12:08

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1373 [^]
(0170004)
hgbot (developer)
2024-10-04 13:16

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 5166fd4babc75fcbd3aa4ee012090de5a369d5b6
Author: Kousalya Ramasamy <k.ramasamy@external.orisha.com>
Date: 04-10-2024 11:16:37
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/5166fd4babc75fcbd3aa4ee012090de5a369d5b6 [^]

Fixed ISSUE-56426: Sql logic change for low reconciliation balance column

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0170005)
hgbot (developer)
2024-10-04 13:16

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1373 [^]
(0170015)
hgbot (developer)
2024-10-04 14:56

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1377 [^]
(0170017)
hgbot (developer)
2024-10-04 16:19

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 308919d55913d50d6a1731b80c30854130c938db
Author: Kousalya Ramasamy <k.ramasamy@external.orisha.com>
Date: 04-10-2024 14:19:50
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/308919d55913d50d6a1731b80c30854130c938db [^]

Fixed ISSUE-56426: Fixing issue in the CI execution

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0170018)
hgbot (developer)
2024-10-04 16:19

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1377 [^]

- Issue History
Date Modified Username Field Change
2024-09-10 16:01 william_vermersch New Issue
2024-09-10 16:01 william_vermersch Assigned To => Triage Omni OMS
2024-09-10 16:01 william_vermersch Modules => Core
2024-09-10 16:01 william_vermersch Triggers an Emergency Pack => No
2024-10-01 15:35 jonae Note Added: 0169851
2024-10-01 15:36 jonae Assigned To Triage Omni OMS => kousalya_r
2024-10-03 12:08 hgbot Note Added: 0169948
2024-10-04 13:16 hgbot Resolution open => fixed
2024-10-04 13:16 hgbot Status new => closed
2024-10-04 13:16 hgbot Fixed in Version => PR25Q1
2024-10-04 13:16 hgbot Note Added: 0170004
2024-10-04 13:16 hgbot Note Added: 0170005
2024-10-04 14:56 hgbot Note Added: 0170015
2024-10-04 16:19 hgbot Note Added: 0170017
2024-10-04 16:19 hgbot Note Added: 0170018


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker