Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only

Maximo Mobile - Technician - Performance - excluding workorder history of Asset and Location from data download

By Piyush Sukhadiya posted Wed April 30, 2025 07:14 AM

  

This article will help improve performance if you observe that the following queries are firing too many times and are costly while you fetch work order data in the Mobile Technician app. 

select * from workorder  where (((status = 'COMP' or status = 'CLOSE')))...... 


And if you don't want to use this "View history" function in your application,

Remove the following from app.xml, 

1. This will remove the button from the UI. Remove following button

<button icon="carbon:calendar--heat-map" on-click="openAssetWorkOrder" on-click-arg="{{'item':woAssetLocationds.item, 'locItem':woLocationds.item, 'woNum': woDetailResource.item.wonum}}" hidden="{page.state.assetLocation}" disabled="{page.state.loading || page.state.workloading ||page.state.historyDisable}" kind="secondary" id="vde7k"/>

2. This will remove the workorder history records of the Asset. 
Remove the following attributes from woAssetLocationds datasource

<attribute name="rel.wobyasset{wonum,description,status,status_maxvalue,statusdate,worktype,siteid}" id="w74bm">
  <maximo-child-filter related-path="asset.wobyasset" order-by="-statusdate" limit="3" where="status in [&quot;COMP&quot;,&quot;CLOSE&quot;]" id="m2ypx"/>
</attribute>

2. This will remove the workorder history records of the Location.
    Remove the following attributes from woLocationds  datasource

<attribute name="rel.wobylocation{wonum,description,status,status_maxvalue,statusdate,worktype,siteid}" id="n7d8n">
              <maximo-child-filter related-path="locations.wobylocation" order-by="-statusdate" limit="6" where="status in [&quot;COMP&quot;,&quot;CLOSE&quot;]" id="bm558"/>
 </attribute>



 Keeping history icon to view history 

The query contains a status filter in two distinct where clauses, which are costly database queries. 

There are few options here : 

1) Show all the Wos except Cancelled in Mobile for Workorder history of Asset or Location.

Remove the where clause from app.xml from the following lines:

<maximo-child-filter related-path="asset.wobyasset" order-by="-statusdate" limit="3" where="status in [&quot;COMP&quot;,&quot;CLOSE&quot;]" id="m2ypx"/>

and change this to 
<maximo-child-filter related-path="asset.wobyasset" order-by="-statusdate" limit="3" id="m2ypx"/>


Same for Locations

<maximo-child-filter related-path="locations.wobylocation" order-by="-statusdate" limit="6" where="status in [&quot;COMP&quot;,&quot;CLOSE&quot;]" id="bm558"/>

change this to 
<maximo-child-filter related-path="locations.wobylocation" order-by="-statusdate" limit="6" id="bm558"/>

2) Update the relationships in Database configuration, to remove “Cancelled” clause from where clause.
This may affect other functionality in your Manage or Integrations where this is being used by including cancelled Workorders as well wherever this relationship is used.

  1. Go to Database configuration Application
  2. Search and go to “Asset” record
  3. Search and select “wobyasset” relationship
  4. Update where clause from

assetnum=:assetnum and siteid=:siteid and istask=0 and status in (select value from synonymdomain where domainid ='WOSTATUS' and maxvalue not in ('CAN'))

to

assetnum=:assetnum and siteid=:siteid and istask=0

The same goes for Locations

  1. Go to Database configuration Application
  2. Search and go to “LOCATIONS” record
  3. Search and select “WOBYLOCATION” relationship
  4. Update where clause from

location=:location and siteid=:siteid and istask=0 and status in (select value from synonymdomain where domainid ='WOSTATUS' and maxvalue not in ('CAN'))

to

location=:location and siteid=:siteid and istask=0

3) Create a new relationship that returns only Closed and completed Workorders.

  1. Update app.xml to use the new relationship. Search for the attribute with rel.wobyasset and rel.wobylocation and update as rel.NEWRELATIONSHIP
  2. Remove the where clause – as shared in the very first option.

4) Adding new indexes can also help improve performance 

  1. CREATE INDEX "MAXIMO"."WORKORDER_STATUS_LOC_IDX" ON "MAXIMO"."WORKORDER" ("STATUS", "LOCATION", "SITEID", "ISTASK");
  2. CREATE INDEX "MAXIMO"."WORKORDER_STATUS_ASSET_IDX" ON "MAXIMO"."WORKORDER" ("STATUS", "ASSETNUM", "SITEID", "ISTASK");

#MaximoMobile #Mobile #Technician #Performance #MaximoMobilePerformance

0 comments
39 views

Permalink