Skip to main content
16-Pearl
July 24, 2024
Question

How to fetch 2000 rows of data from datatable in lesser time.

  • July 24, 2024
  • 2 replies
  • 2354 views

We are fetching almost 2k-3k rows data from datatable to populate in grid. It takes around 1 minute to populate data in tree grid. We also using data filter to filter data from datatable, it takes another 1 minute to filter data from datatable and to populate in grid. How to reduce the time when multiple users fetching data at same time in production environment.

2 replies

16-Pearl
July 25, 2024

Hi @AP_10343008  Create an index for each set of filter criteria commonly used under DataTable > Configuration > Index Settings

look at the below reference article.

https://www.ptc.com/en/support/article/CS363996?source=search

Rocko
19-Tanzanite
July 25, 2024

Have you checked how that time is spent? Is it in execution of the service that gets the data, or in moving over the data to the client, or in the widget trying to render it?

16-Pearl
July 29, 2024

In Grid, All child rows taken from datatable. But Parent rows and its values will be calculated dynamically during execution. As childrows are 2500 in count in datatable, it might take lots of time to add parentrows for every 3 or 5 childrows.

Rocko
19-Tanzanite
July 29, 2024

As Surya wrote, try to use indexing, but to be honest, that's a lot of items to show in a tree...

You could also share your code so readers could look into it.