The mysql database table which I would like to load into the grid contains around 2 million records. The grid does not load at all.
It shows the total record count at the bottom grid and the loading text appears on the grid.
what needs to be done to load the grid with huge volume of data?
Is there a better approach to load the tables with volume?
Hello,
You need to implement paging in grid to limit the records.
e.g.
$opt["rowNum"] = 100;
…
$g->set_options($opt);
This will fetch 100 rows from database at a time.
Option 2 is to make virtual scrolling, that will load data once you scroll down in grid.
e.g.
$opt["srcoll"] = true;
…
$g->set_options($opt);
This will remove the pagination.
The limitation is due to the browser memory capacity as the javascript can consume available memory to show data. If the data is very large, the browser may get stuck.
If you are facing high loading time in search and sort operations, your database may need some optimization (field indexing etc).