97
Views
2
Comments
Page load improvement through ?aggregate optimisation
Application Type
Traditional Web

Hi all,

My home page is a little slow to load, and I'm trying to find ways to make small improvements to the load time.

In the preperation, I'm currently collecting four sepereate aggregates, but they are all collecting data from the same table, which is an external database (Google CloudSQL).

For example; the table looks like this

This is a learning event table, and there are four categories. I'm collecting the last one of each category to display on the home page (and an associated image stored in a different table). Is running four seperate aggregates likely to introduce delay into the loading of the home page?

If so, Is there a way in which I can collect just the last of each category, using just one aggregate?

Thank you

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hello again Leigh!

Querying the same table four times could be the origin of your issue - but if your table has a trivial amount of data, this may end up not being relevant to the performance of your page. The images that you mention could be a problem as well. Do you think you can share a module of your application for everyone to look over? There could be other performance-improving points. 

One thing you could look over right now for an idea regarding your query performance would be the General tab in the Monitoring section of Service Center:

This will give you a list of all slow queries running in your environment, but it may or may not be helpful - queries under a certain time will not be logged, but if you run them several times, their execution time can still add up to a significant delay.

Regarding your data question, I don't think you can use an Aggregate to do that - I believe you'd need an Advanced Query to retrieve the data in that fashion.

2021-11-22 00-14-28
Leigh Rogers

Thank you Afonso,

I've uploaded an OML of my home page. 

Actually, on review, you can see it actually queries three tables, five times, plus a couple of others on every page load. There must be a better way?!

I've done some image optimisation, which does seem to have helped a little.

I've looked through the slowsql log, but nothing stands out yet.

Thank you

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