I have a requirement in which I need to implement a paginator using jQuery.
But the problem is, the table which I need to display in datatable is huge(hundreds of thousands of records). Therefore can't hit the DB to get the total number of rows.
What I need is, a paginator with 4 buttons, First, Previous, Next and Last. At a time, a fixed number of records should be fetched. When clicked on next, it should fetch next set of records from server. If no records are available, then empty data table will also work for me.
I don't think your count query will take much time for just for calculating number of rows in table,
SELECT count(1) from DB_TABLE CONDITION
Although if you want go with custom solution, you can create two buttons with prev and next with page number
Client
Server
similarly you can add search option as well.