Solved

Synchronizing entity ResourceActivity is taking a long time to complete (210 seconds)


Userlevel 5
Badge +12

Hi All.

I’m getting this warning as I sync the Aurena app.

What may I do to fix it?

Using Apps 10 UPD14.

Tks a lot

 

 

icon

Best answer by Bandula 10 March 2022, 20:44

View original

This topic has been closed for comments

12 replies

Userlevel 6
Badge +16

Look to see how much data is being synchronized in this entity - there is a Mobile lobby that will show you this

If the volume of data is too large and not needed by the mobile users then you can add a Permission Set Filter to restrict the amount of data being synchronized. This will increase the sync time for this entity

Cheers

James

Userlevel 5
Badge +12

Look to see how much data is being synchronized in this entity - there is a Mobile lobby that will show you this

If the volume of data is too large and not needed by the mobile users then you can add a Permission Set Filter to restrict the amount of data being synchronized. This will increase the sync time for this entity

Cheers

James

Hi @James Ashmore , tks for the info.

I could see that this view is just to register the report in time in mobile, right?

What do you advise me to filter in this situation? 

E.g.: filter just the record different of Completed, or consider just the actual month?

 

The mobile users just need to report the time and return the work task to the office.

They don’t need the historical.

 

Tks for help and attention

Userlevel 6
Badge +12

Hi @lopespetro  We use ResourceActivity Lu in different functionalities eg. new work

Can you please run below sql and check whether how many records appear for entity ResourceActivity

 

SELECT msd.user_id, msd.device_id, msd.entity, count(1) as "Record Count"
FROM ifsapp.mobile_sync_data msd, ifsapp.mobile_device_app_user mdau
WHERE msd.app_name='MaintEngApp'
AND mdau.app_name=msd.app_name
AND  mdau.device_id = msd.device_id
AND mdau.user_id = msd.user_id
AND msd.user_id = upper('XXXXXXX')    --- Replace your user id
AND mdau.state_db = 'ACTIVE'
GROUP BY msd.user_id, msd.device_id, msd.entity
ORDER BY msd.user_id, msd.device_id, msd.entity

Userlevel 5
Badge +12

Hi @lopespetro  We use ResourceActivity Lu in different functionalities eg. new work

Can you please run below sql and check whether how many records appear for entity ResourceActivity

 

SELECT msd.user_id, msd.device_id, msd.entity, count(1) as "Record Count"
FROM ifsapp.mobile_sync_data msd, ifsapp.mobile_device_app_user mdau
WHERE msd.app_name='MaintEngApp'
AND mdau.app_name=msd.app_name
AND  mdau.device_id = msd.device_id
AND mdau.user_id = msd.user_id
AND msd.user_id = upper('XXXXXXX')    --- Replace your user id
AND mdau.state_db = 'ACTIVE'
GROUP BY msd.user_id, msd.device_id, msd.entity
ORDER BY msd.user_id, msd.device_id, msd.entity

Hi @Bandula , here is the result. Just 5 records.

But as I sync, I get the warning on Logs screen.

Sometimes also the medialiraryItem appears.

 

Considereing topdown the sorting, I have others entities with large number.

Br.

Lopes

Userlevel 6
Badge +12

Ok timing seems not due to returning large rec count.  Can you share the record count in below tables:

  • Mobile_Work_Order_Tab
  • Jt_Task_Tab
  • Resource_Activity_Alloc_Tab
Userlevel 5
Badge +12

Ok timing seems not due to returning large rec count.  Can you share the record count in below tables:

  • Mobile_Work_Order_Tab
  • Jt_Task_Tab
  • Resource_Activity_Alloc_Tab

Yes.

  • Mobile_Work_Order_Tab: 1383
  • Jt_Task_Tab: 134799
  • Resource_Activity_Alloc_Tab: 121423

 

select count(*) from ifspet.Mobile_Work_Order_Tab;
select count(*) from ifspet.Jt_Task_Tab;
select count(*) from ifspet.Resource_Activity_Alloc_Tab;

Userlevel 6
Badge +12

Sorry I forgot to add table resource_activity_tab. Please share that count too.

Userlevel 5
Badge +12

Sorry I forgot to add table resource_activity_tab. Please share that count too.

Sure. Follow.

resource_activity_tab: 1178422

 

Tks

Userlevel 6
Badge +12

It is appeared this very large record count in resource_activity_tab and Resource_Activity_Alloc_Tab causing the delay when syncing Ly ResouceActivity

 

Our default where is 

"origin_key1 IN(select task_seq from Mobile_Work_Order_Uiv) and activity_origin_db = 'WORK_TASK' and resource_activity_seq NOT IN (select resource_activity_seq from resource_activity_alloc)";

 

It is unlikely we can do any thing in the core solution. May be you can try to add below indexes and check for any improvement. 

  • origin_key1 on table  Resource_Activity_Tab
  • resource_activity_seq on table Resource_Activity_Alloc_Tab

Cheers,

B

 

Userlevel 5
Badge +12

It is appeared this very large record count in resource_activity_tab and Resource_Activity_Alloc_Tab causing the delay when syncing Ly ResouceActivity

 

Our default where is 

"origin_key1 IN(select task_seq from Mobile_Work_Order_Uiv) and activity_origin_db = 'WORK_TASK' and resource_activity_seq NOT IN (select resource_activity_seq from resource_activity_alloc)";

 

It is unlikely we can do any thing in the core solution. May be you can try to add below indexes and check for any improvement. 

  • origin_key1 on table  Resource_Activity_Tab
  • resource_activity_seq on table Resource_Activity_Alloc_Tab

Cheers,

B

 

Hi @Bandula , tks for the analisy and advice.

Besides that, is there any option in permission set filter to reduce the number of records to be sync to mobile?

IF yes, What can I filter to improve performance.

Tks a lot

Userlevel 6
Badge +12

Hi @lopespetro , As you see you already get a small data count to mobile in Lu (5 records) So PS filters won’t helps. So as I see try out the indexes would be a better option here 

Userlevel 5
Badge +12

Hi @lopespetro , As you see you already get a small data count to mobile in Lu (5 records) So PS filters won’t helps. So as I see try out the indexes would be a better option here 

Great @Bandula.

Tks for attention and help.

Br.

Lopes