SLOWSQL: GetActivationCache


OS: OutSystems.HubEdition.RuntimePlatform. DBRuntimePlatform.GetActivationCache took XXX ms

I see this tons of times in my General Log and my questions are:

1. What does it do actual?
2. What causes it?
3. How can I solve this?
Hi Joost,

Well, that query in particular is used as a cache for getting Platform Activation information.

The table it accesses, however, is relatively small, so I'm wondering why is it happening. I would guess that the entire database is under a heavy load, and that those warnings do show up at the same time you are getting similar warnings for other application queries... Is this correct? Or is that the only warning you're getting?

In terms of solving it, more than solving that particular SlowSQL warning, I would focus on others, since this one seems to be more of a side-effect than necessarily the cause of it all. If the DB is under load, all database accesses will suffer. Solving database issues is something of a science and an art. I'll quote Tiago Simões here, since he already posted some tips for similar problems in the past:

For the Slow SQL warnings you are getting, you can:
- Review the query or entity action
- Create indexes in the affected entities
- For more information refer to the "Performance Tuning for OutSystems Applications" Technical Note

If you have database administrator permissions you can also:
- Analyze a database load using Microsoft Index Tuning Wizard
- Review database system memory requirements
- For more information refer to the “Hub Server Capacity Planning Calculator” Document

Let us know if these help.


Paulo Tavares


Well, we have some queries that are taking pretty long (17000+ ms), and we are working on that.
Problem is, it's not our database and there are some serious heavy actions performed on that database.

So even without running our app,
the service center will show tons of slowsql's of that "getActivationCache", so hence my question and hopefully a simple solution ;)
(creating indexes will take time because it's not our database and the server is freezed until 15th jan)

Hi Joost,

Well, that sure are a lot of SLOWSQL warnings. Are these happening at the same time your other queries are taking 17000+ ms, or do they occur at separate times?

I forwarded this to our support team, since they probably can better pinpoint what you can do about it.


Paulo Tavares
That moment was just "at night" thus none of my queries were running.

At the moment i'm exploring several paths to decrease the values, hence my question on these specific "queries".
Hopefully I can exclude Outsystems out of the equation and convince people it's the network, crappy server or other stuff.