MySQL Forums :: Newbie :: Heavy task on mysql by AJAX Pagination?


Advanced Search

Heavy task on mysql by AJAX Pagination?
Posted by: Bruce Dickinson ()
Date: August 26, 2011 06:42AM

I use the classical method to create pagination for a long list retrieved from mysql database with a command like

$resultPaging = mysql_query("SELECT * FROM Posts ORDER BY Updated DESC LIMIT $offset, $limit", $con);

In this method, a set of data is read from database by visiting next page. A modern method has been introduced using AJAX and jQuery. In the latter one, there would be one-time connect to the mysql, and all the list is ready to be displayed. I think it can make a heavy task on mysql as it reads the entire list. Considering that all visitors will not browse all pages (normally one of few pages). Ain't it better to read only the data which will be seen by the visitors?

Which is the best method in favor of lighter mysql performance.

Options: ReplyQuote


Subject Written By Posted
Heavy task on mysql by AJAX Pagination? Bruce Dickinson 08/26/2011 06:42AM
Re: Heavy task on mysql by AJAX Pagination? Guelphdad Lake 08/26/2011 07:31AM
Re: Heavy task on mysql by AJAX Pagination? Bruce Dickinson 08/26/2011 08:04AM
Re: Heavy task on mysql by AJAX Pagination? Barry Galbraith 08/26/2011 06:01PM
Re: Heavy task on mysql by AJAX Pagination? Guelphdad Lake 08/26/2011 10:51AM
Re: Heavy task on mysql by AJAX Pagination? Bruce Dickinson 08/26/2011 11:33AM
Re: Heavy task on mysql by AJAX Pagination? Guelphdad Lake 08/26/2011 02:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.