Fetch All records at once

QuestionsFetch All records at once
Ram asked 9 years ago

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.

1 Answers
Abu Ghufran answered 9 years ago

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.

Your Answer

15 + 6 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?