I am searching for records in a table as follows:
SELECT Id, Name FROM my_table WHERE Name LIKE \'%prashant%\' LIMIT 0, 10;
Now, I am addin
In case of huge tables and selecting multiple fields (not just Id, Name as in your example) i would recommend to use 2 queries. Selecting count(0) first with all those WHERE clauses and only then build the pagination, selecting data etc. It will work really faster on some popular eCommerce website, for example.