Generating OrganisationUnitGroupSet table tooks half of the time of resource tables generation

In a dhis2 v2.38 instance, the step of “generating OrganisationUnitGroupSet table” during the “generation of resource tables” takes almost half of the time (25 minutes).

Any idea/comment about how this step could be improved? Any review of the metadata? Any new index in the db?

Hi @ctejo

How many Organisation Unit Group Sets do you have in your instance? Are there any failures during the generation? Did you check the Catalina.out log to see if there are any issues?

Could you share more info about your system infrastructure to have an expectation of performance?

Thanks!

Hi Carlos,

Just out of interest, do any of the OU Group Sets have the option “Include subhierarchy in analytics” ticked?

I’m purely speculating here, but looking at the design of that option (eg it has to check the parent OUs of each OU in order to determine what to inherit), I’m guessing that generation of the resource tables might be somewhat more complex when it’s ticked.

Cheers, Sam.

1 Like

Thanks for the responses!
So, currently, there are 157 Organisation Unit Group Sets, and there is no error during the process.

Sorry, I click “reply” very fast :wink:

Specs: 8 CPUs and RAM 64GB (Postgres assigned: 7 CPUs and 52 GB)

9 (out of 157) OUGS has “Include subhierarchy in analytics” ticked. If I change the OUG and un-ticketing that option, the amount of time decrease from 25 minutes to 17 minutes.

Many thanks for this feedback, that’s really interesting to know - so a third of the time was being spent on just those 9 OUGs which “include subhierarchy in analytics”. That does definitely explain some of the delay, but 17 minutes still sounds quite slow…

1 Like