Platform Slow Queries

Platform Slow Queries


I have one community edition with AluguerDeCampos.Com platform, witch have about 1000 users/day and about 5000 page hits/day and when I got SQL weekly Report my top entries are:

OS: OutSystems.HubEdition.RuntimePlatform.DBRuntimePlatform.IsUserActive  
2 308
OS: OutSystems.HubEdition.Scheduler.DBScheduler.GetPendingActivities  
1 893
OS: OutSystems.HubEdition.Scheduler.DBScheduler.DequeueEmails  
1 406
OS: OutSystems.HubEdition.RuntimePlatform.DBRuntimePlatform.DequeueEvent  
1 076
OS: OutSystems.HubEdition.RuntimePlatform.DBRuntimePlatform.IsUserActive  
2 750
OS: OutSystems.HubEdition.RuntimePlatform.SessionConfiguration+#qN5.#jjb  
1 616
OS: OutSystems.HubEdition.Scheduler.DBScheduler.GetCyclicJobs  
1 127

No BPT is used.

Any Ideia?

Thanks in advance.
Hello Diogo,

Some of these particular queries are performed a lot (and I mean a lot) of times. This is likely not a problem. It's just a matter of small queries being performed a lot.

Why are you looking into this? Are you having performance issues associated with these queries ?

Ricardo Silva
Thanks Ricardo,

I just notice now that the last columns didnt paste.

 Attach image.

Are this times normal?!
No, those times aren't normal. And the fact that they're appearing there are proof of it.

Allow me to elaborate:

GetPendingActivities runs (roughly) once every 0.5 seconds*. Over the course of one week that'll be 1209600 times. Of those times, only 415 (0.03% of executions) were over 200ms. The vast majority of the executions were perfectly acceptable, likely immediate.

A similar analysis could be made for most the other queries.

What this data shows is that sometimes these queries get slow... really slow. It would be important to find out where in time these slowdowns occurred, to be able to correlate with other events.

They could be slow during database maintenance tasks, or during unusual peak hours. You can check these timings by going through the General Log (filtering by SLOWSQL).

In conclusion: I wouldn't fret about this.

* this is off the top of my head, I will double check this information. But it gets ran A LOT.