Totara Learn Open Discussions

Dynamic Audience - Optimisation

 
ButcherNevin
Dynamic Audience - Optimisation
ButcherNevin 发表于 2024年08月14日 Wednesday 18:17
 

Hello All


Just a random query that I was pondering - We have several hundred dynamic audiences and I'm looking at if/where/how I can optimise the rule sets as our audience update cron has been known to struggle.


One scenario I'm puzzling over is:


If an audience has the rule "Is enrolled in X course" - Does the system search through all the users in the system to see if they're enrolled OR does it just search via the course to see who is enrolled.


Trying to figure out if the most optimal rule would be "User is part of X org, Account suspended is No, User is enrolled in X course" OR just plainly "User is enrolled in X course"


Thanks in advance, hope that makes sense :-)


Cheers


Nevin

CooperLee
Re: Dynamic Audience - Optimisation
CooperLee 发表于 2024年08月15日 Thursday 07:45
小组 Totara小组 TXP Site Administrator

Hi Nevin

I had a conversation with one of our developers about this recently, so let me see if I can find it and get back to you. There are certain rules that are performance heavy, so what you are considering makes perfect sense. Leave it with me and I will get back to you

Thanks

Lee

CooperLee
Re: Dynamic Audience - Optimisation
CooperLee 发表于 2024年08月16日 Friday 00:59
小组 Totara小组 TXP Site Administrator

Hi Nevin,

I spoke with the team here who have advised the below…

For the enrolment one, it will filter the system, but it does it in a pretty optimal way at the database level so it's probably not the bottleneck.

The most problematic audience rules are the ones that do 'partial matches' e.g. username or email will match "anything@example.com" or if you search for contains"example.com". And in particular, if you pass a comma separated list i.e. username is cooper, jones, smith etc, it will have to repeat the search for each one. So that's where creating set audiences of users and then including them via an audience rule is much better.

I hope this helps a little

Lee

ButcherNevin
Re: Dynamic Audience - Optimisation
ButcherNevin 发表于 2024年08月18日 Sunday 16:15
 

Hey Lee

That's fantastic - appreciate you tracking that info down for me.

Cheers

Nevin