Is there any possibility to fetch all the records from db at once. I am fetching millions of records from a mssql query and it takes more than 5 mins to fetch even the first page data and when i click page 2 it takes the same amount of time again (It takes lesser time on a DB tool to fetch all the records. ~3:30 mins) so I thought to fetch all the data even if it takes 5 mins. I tried using local arrays but it takes more time. Is there any way this can be done.
Also Is there any concept of loading data in the background by showing only fewer data at the start and loading the remaining in the background.
You can show limited records per page (e.g 20) by setting:
$opt["rowNum"] = 20;
And set to load next page on when scrolled down (laz loading) by setting:
$opt["scroll"] = true;
$g->set_options($opt);
Displaying millions records altogether is not recommended way as it will consume too much browser memory.