cancel
Showing results for 
Search instead for 
Did you mean: 
1

Ask

2

Reply

3

Solution

slow data base is loading

AmitSharma90444
1: Seeker

I coded datatable using server side processing with ajax, in two different version, even try the aspjson code, and the speed is still an issue for me. If I limit my query data to 1000 entries, its fairly quick, takes about 5second, but at only 8,000 entries, it takes a full 2 minutes to load. This is too long of a wait. If I refresh the page say 10 times, I might get an ajax error once. Not sure why is does that cause 95% of the time, it works, except its just slow. My table is use to load data of 8 Ball Pool Mod Apk (that contains English and French characters, html tags, etc..), pagination, searching, filters. I could never get it to render it faster. Any tips would be appreciated:

You can load part of data only for one page. For make this solution you need changing API and update JS code if your table doesn't support it. I do it this way.

For request:
a) limit - number row in page
b) offset - number row for skip (limit * current page)
c) order - column name for order (Example: for ASC is order=prcie or for DESC is order=-price)
d) plus other params for filtering.

For response:
a) count - count row in table (Example: SELECT count() FROM some_table WHERE / + filter if necessary*/;)
b) rows - array of rows (Example: SELECT * FROM some_table WHERE /* + the same filter if exist */ ORDER BY some_column ASC|DESC LIMIT $limit OFFSET $offset)

For pagination:
a) Set count page to bootspap pagination
b) Set current page if necessary

1 REPLY 1

hrym
17: Community Champion
17: Community Champion

Um, this is a Vodafone UK forum for the mobile network.   Am I missing something, or is this not a Vodafone/mobile data issue?   I'm just wondering whether there are developer forums where you'd be better off posting your query?