Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||||||||||||||||
View Issue Details | ||||||||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
0027712 | Openbravo ERP | 04. Warehouse management | public | 2014-09-30 09:38 | 2014-11-04 06:42 | |||||||||||||||||||||
Reporter | alostale | |||||||||||||||||||||||||
Assigned To | eduardo_Argal | |||||||||||||||||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||||||||||||||||
Status | closed | Resolution | fixed | |||||||||||||||||||||||
Platform | OS | 5 | OS Version | |||||||||||||||||||||||
Product Version | ||||||||||||||||||||||||||
Target Version | Fixed in Version | |||||||||||||||||||||||||
Merge Request Status | ||||||||||||||||||||||||||
Review Assigned To | pramakrishnan | |||||||||||||||||||||||||
OBNetwork customer | OBPS | |||||||||||||||||||||||||
Web browser | ||||||||||||||||||||||||||
Modules | Core | |||||||||||||||||||||||||
Support ticket | ||||||||||||||||||||||||||
Regression level | ||||||||||||||||||||||||||
Regression date | ||||||||||||||||||||||||||
Regression introduced in release | ||||||||||||||||||||||||||
Regression introduced by commit | ||||||||||||||||||||||||||
Triggers an Emergency Pack | No | |||||||||||||||||||||||||
Summary | 0027712: slow goods receipt batch insertion | |||||||||||||||||||||||||
Description | Batch insert of good receipts with many lines is slow. | |||||||||||||||||||||||||
Steps To Reproduce | In a DB with the following data: m_inout: 500 records m_inoutline: 220K records m_attributesetinstance: 225K records m_storage_detail: 204K records, all of them for the same product ('TEST_IMEI_01') This testing DB can be downloaded from: https://drive.google.com/a/openbravo.com/file/d/0B2PGxKaZaJn-amwya25HZXE2T3M/view?usp=sharing [^] Execute the following script to create shipments (attached file to create the script): select generateGoodReceipt('TEST_IMEI_01', 'TEST_IMEI_01', '10_IMEITEST', 10) First parameter is a Search Key of a product already existing in F&B Client Second Parameter is a Search Key of an existing Storage Bin third parameter is the Document Number you wish for the Goods Receipt See times before and after applying proposed solution: 10 lines 2600ms -> 120ms 100 lines 23470ms -> 974ms 1000 lines (not tested) -> 5959ms 10000 lines (not tested) -> 60645ms | |||||||||||||||||||||||||
Proposed Solution | In this case, most of the time is taken in m_update_inventory function in queries to m_storage_detail, though the are using the unique index the number of records retrieved is high causing slowness. Proposals: * Testing it, removing coalesces for m_attributesetinstance_id when possible makes a huge improvement (attached diff). Review it is correct * Additionally: - initial query is doing a count to know if there's ANY value -> don't count, just check if it exists - is it possible for initial query to return count > 1? If a single value is expected, id should be stored to be in the other queries | |||||||||||||||||||||||||
Additional Information | ||||||||||||||||||||||||||
Tags | Performance | |||||||||||||||||||||||||
Relationships |
| |||||||||||||||||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=7280&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=7281&type=bug | |||||||||||||||||||||||||
Issue History | ||||||||||||||||||||||||||
Date Modified | Username | Field | Change | |||||||||||||||||||||||
2014-09-30 09:38 | alostale | New Issue | ||||||||||||||||||||||||
2014-09-30 09:38 | alostale | Assigned To | => dmiguelez | |||||||||||||||||||||||
2014-09-30 09:38 | alostale | OBNetwork customer | => No | |||||||||||||||||||||||
2014-09-30 09:38 | alostale | Modules | => Core | |||||||||||||||||||||||
2014-09-30 09:38 | alostale | Triggers an Emergency Pack | => No | |||||||||||||||||||||||
2014-09-30 09:39 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=6685#r6685 | |||||||||||||||||||||||
2014-09-30 09:40 | alostale | File Added: GenerateGoodsReceipt.sql | ||||||||||||||||||||||||
2014-09-30 09:40 | alostale | Summary | slow shipment batch insertion => slow goods receipt batch insertion | |||||||||||||||||||||||
2014-09-30 09:40 | alostale | Description Updated | bug_revision_view_page.php?rev_id=6687#r6687 | |||||||||||||||||||||||
2014-09-30 09:45 | alostale | Tag Attached: Performance | ||||||||||||||||||||||||
2014-09-30 09:47 | alostale | File Added: update-inventory.diff | ||||||||||||||||||||||||
2014-09-30 09:50 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=6688#r6688 | |||||||||||||||||||||||
2014-09-30 09:57 | alostale | Relationship added | related to 0027713 | |||||||||||||||||||||||
2014-09-30 09:58 | alostale | Issue Monitored: alostale | ||||||||||||||||||||||||
2014-09-30 11:25 | jonalegriaesarte | OBNetwork customer | No => Yes | |||||||||||||||||||||||
2014-09-30 11:25 | jonalegriaesarte | Resolution time | => 1414623600 | |||||||||||||||||||||||
2014-09-30 11:25 | jonalegriaesarte | Severity | minor => major | |||||||||||||||||||||||
2014-10-09 16:45 | jpcalvente | Issue Monitored: jpcalvente | ||||||||||||||||||||||||
2014-10-21 18:49 | eduardo_Argal | Status | new => scheduled | |||||||||||||||||||||||
2014-10-21 18:49 | eduardo_Argal | fix_in_branch | => pi | |||||||||||||||||||||||
2014-10-21 18:49 | eduardo_Argal | Status | scheduled => resolved | |||||||||||||||||||||||
2014-10-21 18:49 | eduardo_Argal | Fixed in SCM revision | => https://code.openbravo.com/erp/devel/pi/rev/c1d30f85a429d63b04ee6470072ec5b1742acc5e [^] | |||||||||||||||||||||||
2014-10-21 18:49 | eduardo_Argal | Resolution | open => fixed | |||||||||||||||||||||||
2014-10-21 18:50 | eduardo_Argal | Note Added: 0071103 | ||||||||||||||||||||||||
2014-10-21 18:50 | eduardo_Argal | Note Added: 0071104 | ||||||||||||||||||||||||
2014-10-24 10:49 | hgbot | Checkin | ||||||||||||||||||||||||
2014-10-24 10:49 | hgbot | Note Added: 0071160 | ||||||||||||||||||||||||
2014-10-24 18:41 | eduardo_Argal | Relationship added | related to 0027980 | |||||||||||||||||||||||
2014-10-31 13:09 | dmitry_mezentsev | Assigned To | dmiguelez => Sandrahuguet | |||||||||||||||||||||||
2014-10-31 13:22 | Sandrahuguet | Assigned To | Sandrahuguet => eduardo_Argal | |||||||||||||||||||||||
2014-11-04 06:42 | pramakrishnan | Review Assigned To | => pramakrishnan | |||||||||||||||||||||||
2014-11-04 06:42 | pramakrishnan | Note Added: 0071386 | ||||||||||||||||||||||||
2014-11-04 06:42 | pramakrishnan | Status | resolved => closed | |||||||||||||||||||||||
2015-03-10 09:59 | ngarcia | Relationship added | causes 0029211 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|