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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033788
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2016-08-24 10:502018-03-16 14:45
ReportershuehnerView Statuspublic 
Assigned ToSandrahuguet 
PrioritynormalResolutionfixedFixed in VersionRR18Q2
StatusclosedFix in branchFixed in SCM revisionc28f8c44a0ee
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033788: OrderLoader.createShipmentLines query to m_locator could be optimized away

DescriptionSplit out part mentioned as note already in issue 33157

createShipmentLines has following code near the end of the function:

        if (pendingQty.compareTo(BigDecimal.ZERO) != 0) {
          // still qty to ship or return: let's use the bin with highest prio
          hqlWhereClause = " l where l.warehouse = :warehouse order by l.relativePriority, l.id";
          OBQuery<Locator> queryLoc = OBDal.getInstance()
              .createQuery(Locator.class, hqlWhereClause);
          queryLoc.setNamedParameter("warehouse", warehouse);
          queryLoc.setMaxResult(1);

That query very similar to one done earlier (see issue 33139).
That earlier query does search with any specified order just to check if it can find 'any' m_locator entries in current warehouse.

This query searched for 1 with highest relativePriority.

By adding orderBy that first query its result could be reused to also serve in this code here and the extra query removed.

Note: That would add some small overhead to that first query by forcing 'order by relativePriority,id limit 2'

Steps To Reproduce-
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033158 closedshuehner Duplicate query done by accident in OrderLoader.createShipmentLines 

-  Notes
(0103298)
hgbot (developer)
2018-03-16 08:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c28f8c44a0eeb99c22252cea20dfb76baf1f1242
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Mar 15 08:46:54 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c28f8c44a0eeb99c22252cea20dfb76baf1f1242 [^]

Fixed issue 33788 optimize OrderLoader.createShipmentLines query

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---

- Issue History
Date Modified Username Field Change
2016-08-24 10:50 shuehner New Issue
2016-08-24 10:50 shuehner Assigned To => Retail
2016-08-24 10:50 shuehner Triggers an Emergency Pack => No
2016-08-24 10:51 shuehner Tag Attached: Performance
2016-08-24 10:51 shuehner Relationship added related to 0033158
2018-03-14 13:14 Sandrahuguet Assigned To Retail => Sandrahuguet
2018-03-14 15:20 Sandrahuguet Review Assigned To => marvintm
2018-03-16 08:19 hgbot Checkin
2018-03-16 08:19 hgbot Note Added: 0103298
2018-03-16 08:19 hgbot Status new => resolved
2018-03-16 08:19 hgbot Resolution open => fixed
2018-03-16 08:19 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c28f8c44a0eeb99c22252cea20dfb76baf1f1242 [^]
2018-03-16 14:45 marvintm Status resolved => closed
2018-03-16 14:45 marvintm Fixed in Version => RR18Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker