SQL Database queries on Page Load

Hi, I need help in optimizing the performance on Page load. I’m using SQL Database connector to bring my data from external db. This is my page where I have few tabs. And on page load only My Products Tab is set to be visible.

.

When I load the page, I can see around 55 queries related to all other tabs are being triggered.


The different Menus are placed in groups and their visibility is set with the help of custom states. But My Sales tab which is not visible on page load is also triggered. Similarly every query related to that page is triggered on Page load.

Also after Page load, when I move across different tabs, around 13 requests are made to the db for every tab. For eg, when I move to My Sales tab, for 7 line items it makes 7 triggers instead of one single request.


This is my structure - datasource for my RG alone has the SQL query

Please help, as I need to optimize the speed and performance.

It depends on the size of the returned payload, but you can do only one select * and then filter the results inside the tabs, instead of having to call the database for every tab.

Hi @akamarski , My return payload is approximately from 10 records to maximum 30 records at a time. Not more than than.
My question is - It has to execute only one query for My Products during page load. But it is sending all requests other than product query also- like orders, sales, transaction,etc.,… Adding to it, it has to execute only one query for Products. But instead for every line item it is sending request. Is this how it works… Or am I missing something…?

This topic was automatically closed after 70 days. New replies are no longer allowed.