Server-side processing clarification

Server-side processing clarification

elimariaaaelimariaaa Posts: 30Questions: 11Answers: 0

When we say server-side, is this equal to the usual MYSQL query:
"SELECT column FROM table LIMIT 10 OFFSET 10;" ?

I just want to make sure that datatables only get the necessary data per page.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,892Questions: 1Answers: 10,530 Site admin
    Answer ✓

    Yes, LIMIT and OFFSET are valid syntax for MySQL and many other SQL dialects.

    Allan

  • elimariaaaelimariaaa Posts: 30Questions: 11Answers: 0

    Thanks for the answer Allan!

    Another question, if we use server-side processing, does this mean that the filter and search pull data on server side as well?

    Example:

    I have 100 data from the database. 20 of them has the name 'Maria' but the first page only shows 10 data at a time and only 2 data with the name 'Maria' is present. If I look for 'Maria' on the search field, will it show 2 data or 20?

    -Eli

  • allanallan Posts: 63,892Questions: 1Answers: 10,530 Site admin
    Answer ✓

    if we use server-side processing, does this mean that the filter and search pull data on server side as well?

    Yes.

    Every operation on the table, such as search, sort and page will require an Ajax request to the server to get the data. Full details are available in the manual.

    If you only have 100 rows I wouldn't bother with server-side processing. Its only really useful once you get to tens of thousands of rows.

    Allan

  • elimariaaaelimariaaa Posts: 30Questions: 11Answers: 0

    Hi Allan,

    Thank you very much for your answer. I have another issue with datatables but I will open a new thread as it is irrelevant with this topic.

    Cheers,
    Eli

This discussion has been closed.