Application Type

Hello all,

I am getting one log of SLOWSQL as "OutSystems.Application.Session.Data.DBSessionMetadata.GetAllUserRoles took 9998 ms" every time I am giving call to the server. This is causing performance issues as the application is getting extremely slow.

Can anyone help me to resolve this?

It would help if you would share your query. 

Whenever I am giving any call to the server like refreshing aggregates or executing server action, it is taking time to process. I can see in the general logs all the server calls are stated as SLOWSQL and it is taking time more than 9000 ms for every server call.

I have shared the SS for the reference

WhatsApp Image 2023-09-25 at 4.32.30 PM.jpeg

Hi @Shubham Doshi ,

I think @Vincent Koning is talking about the actual sql query / statement, right now it is just guessing for us what might cause this.

It can have multiple reasons for taking so long.

- Multiple tables are being joined which impacts the performance.

- The table is filled with more records making it slower to retrieve all.

Besides that is it really needed to get the data so often? according to the screenshot every minute the statement is called around 5 or 6 times.


Hi Shubham,

From screenshot you shared, can see most of the slow sql are due to action getAllUserRoles(). Can you check source code in this method or can share so that can check once.


I am just refreshing aggregate which contains only 2 tables an also 2-3 records only.

Also I am not using any query for GetAllUserRoles() but still I can see the logs. I don't understand why these logs are getting created when I am not using any action related to it 

There is a lot happening in the background that does not have anything to do with your application. It could also be from another application? Not sure since you didn't share the applied filters.

I would suggest contacting Support and let them assist you in troubleshooting this issue. I'm not so sure that the issue is in your code but since you don't share any details it is also impossible to determine. It can also simply be an underperforming environment that needs to be sized correctly. Something they also can do. 



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.