Grow your CSS skills. Land your dream job.

Server Side Data table is very slow

  • # July 14, 2013 at 2:42 pm

    I have a page on my site that displays all the customers list for our clients, i am currently using JQuery Data table plugin for pagination, searching and sorting. It works fine except one problem ‘data loading’. It loads 3000′s of rows from the sql database and populates the table, then apply the jquery plugins for searching, sorting and pagination. This process takes 10 seconds Offline and much more online.

    and over this the table has to be loaded again and again for various reasons.

    What should I do

    # July 14, 2013 at 4:17 pm

    Does it need to load all of those rows? Could you cache the data in some way?

    # July 14, 2013 at 4:24 pm

    umm it is required to load all data but what i have in mind is that it loads 10 entries and when clicked on next page it loads 10 next entries, same when searched it searches all data.

    i guess I am making sense
    Edit : No i dont want to cache data as it is kind of sensitive with all names , address and phone numbers etc.

    # July 14, 2013 at 4:36 pm

    Then I think the better way to load the data is on demand. I don’t know how the plugin works, but if you only want 10 entries at a time, ask for just those 10 entries from the database, since the slowness is to a large extent (likely) to do with the many rows it’s needing to load.

    # July 14, 2013 at 4:43 pm

    hmm ok thanks was thinking if i can implement ajax there but am not good in ajax as of now. i will keep trying.

    thanks a lot!

    # July 14, 2013 at 4:44 pm

    If you already have jQuery in there, you can reasonably easy fetch things from the database.

    You are using PHP to fetch the rows as is, printing them out in HTML, or how?

    # July 14, 2013 at 4:52 pm

    Fetching through a PHP function that is executing [SELECT * FROM customers WHERE ...] and populating it as tr td , Jquery datables edit it and make it divs and add other functionings

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".