Hello
The problem we are facing is a GQI query which is sending back 2000 rows at least and first call seems to make a full load and then pagination is made on the dataset. So it takes a lot of time.
i would like to handle pagination on server side by myself but problem is that pagination properties available in payload of GetNextQuerySessionPage request are not available in the GetNextPageInputArgs argument of GetNextPage GQI function.
May be i am using the wrong class to get that ?
the answer which would say we should filter first to have less data is not accepted 🙂
thanks
Hi Julien,
It is currently not possible to know the pagesize in the GQI ad hoc data source. But in fact, that's not necessarely needed to improve the performance. Because within your ad hoc datasource you can define yourself how big the pages are that you want to return.
For example, you can create a GQIPage object with 10 rows and indicate that there are more rows by setting the HasNextPage boolean to true. If that boolean is true, GQI will know that there is more data. Which it will request if needed.
You can find an example here: https://docs.dataminer.services/user-guide/Advanced_Modules/Dashboards_and_Low_Code_Apps/GQI/Extensions/API_Reference/IGQIDataSource.html#examples
Hope this helps!
Best regards, Ward
thanks for the feedback
i tested the code example and it works correctly but something strange is happening.
once the page is displayed the getnextpage is called in few seconds and twice for the first page (GetNextPage 1)
And all the pages are called in few seconds ( 269 rows in database).
So that means that all the data is loaded on server side even if only the first page is displayed in the grid.
Second point is pageSize is set to 100 in GQI but the component still displays 50 rows.
i did a second test with pageSize to 50 and all the date is still loaded
Question is why all the pages are loaded at screen init and not when scrolling down ?
is there any parameter or configuration which might help ?
Thanks for your feedback
is there an instance kept in memory per user or active page ?
https://docs.dataminer.services/user-guide/Advanced_Modules/Dashboards_and_Low_Code_Apps/GQI/Extensions/API_Reference/IGQIDataSource.html#examples
in this example, pagecounter is incremented which that means its value is kept between two calls ?
Hi Julien, it all depends on the query and what you are visualizing in your app/dashboard. For example, if you add an ‘aggregate’ operator to your query than all data of your data source is needed, which would explain why all pages are fetched. Another example, if you would sort the data in your table, it could also result in all pages getting fetched from your data source.
If the client only shows 50 rows while your data source returns 100 rows, than the other 50 rows are kept in memory in GQI. If another page is fetched the 50 rows from memory are returned.
Could you give me some more information on how the query is used in the dashboard/app? Feel free to contact me through support.data-exploration@skyline.be if that would be more convenient.
Best regards, Ward