Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2017-11-06 17:272018-01-03 12:38
ReportergorkaionView Statuspublic 
Assigned Todmiguelez 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revision38268cab93c5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0037236: Create Lines From popup on Purchase Invoice slow when having many Orders

DescriptionOn a environment with a high volume of Orders. Try to open the Create Lines From in Purchase Invoice window.

The popup can take up to 30 seconds to Open. Selecting a Shipment or Receipt the page is reloaded taking another 30 seconds.
Steps To ReproduceGet an environment with a high volume of orders. ~1 million

Have a vendor with some open orders pending to invoice.

Try to open the Create Lines From window.
Proposed SolutionThe issue is in the Query to load the combo of Purchase Orders.

selectFromPOCombo of CreateFromInvoice_data.xsql

This query is doing a Seq Scan on M_MatchPO. This can be avoided by an index on c_orderline_id similar to the existing one on m_inoutline_id

"m_matchpo_inout" btree (m_inoutline_id) WHERE m_inoutline_id IS NOT NULL

Consider if the new index can replace the "m_matchpo_ship" index.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
dmiguelez (developer)
2017-11-07 11:23

Tested with client's data.

Without the patch took 30 seconds.
With the patch less than a second.
hgbot (developer)
2017-11-07 17:15

Repository: erp/devel/pi
Changeset: 38268cab93c5aa3f60ea3bcfa812168eec308d44
Author: David Miguelez <david.miguelez <at>>
Date: Tue Nov 07 11:20:04 2017 +0100
URL: [^]

Fixes Issue 37236. Modifies index over c_orderline and m_inoutline
to remove the clause "where m_inoutline_id is null"

By doing so, the c_orderline is fully indexed and improves performance.
There is no need to create a partial index for the c_orderline,
since this column is mandatory.

M src-db/database/model/tables/M_MATCHPO.xml
vmromanos (developer)
2017-11-07 18:01

Code review OK
hudsonbot (developer)
2018-01-03 12:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-11-06 17:27 gorkaion New Issue
2017-11-06 17:27 gorkaion Assigned To => Triage Finance
2017-11-06 17:27 gorkaion Modules => Core
2017-11-06 17:27 gorkaion Triggers an Emergency Pack => No
2017-11-06 17:50 dmiguelez Assigned To Triage Finance => dmiguelez
2017-11-07 11:23 dmiguelez Note Added: 0100301
2017-11-07 17:15 hgbot Checkin
2017-11-07 17:15 hgbot Note Added: 0100311
2017-11-07 17:15 hgbot Status new => resolved
2017-11-07 17:15 hgbot Resolution open => fixed
2017-11-07 17:15 hgbot Fixed in SCM revision => [^]
2017-11-07 18:01 vmromanos Review Assigned To => vmromanos
2017-11-07 18:01 vmromanos Note Added: 0100312
2017-11-07 18:01 vmromanos Status resolved => closed
2017-11-08 10:39 dmiguelez Fixed in Version => 3.0PR18Q1
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101378

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker