Title: guzin's Replies | WordPress.org

---

# guzin

  [  ](https://wordpress.org/support/users/guzin/)

 *   [Profile](https://wordpress.org/support/users/guzin/)
 *   [Topics Started](https://wordpress.org/support/users/guzin/topics/)
 *   [Replies Created](https://wordpress.org/support/users/guzin/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/guzin/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/guzin/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/guzin/engagements/)
 *   [Favorites](https://wordpress.org/support/users/guzin/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Where is $comments array created? What file, what function?](https://wordpress.org/support/topic/where-is-comments-array-created-what-file-what-function/)
 *  [guzin](https://wordpress.org/support/users/guzin/)
 * (@guzin)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/where-is-comments-array-created-what-file-what-function/page/2/#post-1340422)
 * The thing is that with the wordpress functions, pagination works with the entire
   array of results (comments in this case) and then starts loading them from the
   page you’re on, so for every page, the entire recordset is loaded then Walker::
   paged_walk sets the pointer to start loading from whatever page you’re on.
 * If you’re looking to see where the $comments are created, see wp-includes/query.
   php, $this->comments is the entire array of comments then passed on to the different
   functions in comments-template.php and so on.
 * A solution would be to load the comments based on your own pagination code, querying
   the database with the LIMIT X,Y and then output the HTML using the standard mysql
   functions from PHP.
 * See [http://www.onextrapixel.com/2009/06/22/how-to-add-pagination-into-list-of-records-or-wordpress-plugin/](http://www.onextrapixel.com/2009/06/22/how-to-add-pagination-into-list-of-records-or-wordpress-plugin/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Where is $comments array created? What file, what function?](https://wordpress.org/support/topic/where-is-comments-array-created-what-file-what-function/)
 *  [guzin](https://wordpress.org/support/users/guzin/)
 * (@guzin)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/where-is-comments-array-created-what-file-what-function/page/2/#post-1340419)
 * I was trying to load a table with some 6000 records using that function ($wpdb-
   >get_results()), and it wouldn’t do it, it would actually break the code, so 
   I figured it had to do with the memory specified in your php.ini (memory_limit),
   when it is usually 32MB, my attempt to load the 6000 records with the get_results()
   function was loading a big array into memory (more than 55MB in memory usage),
   so PHP simply stopped running my code, however, I was able to load the array 
   using OBJECT instead of ARRAY_A (associative arrays are heavier), but we want
   it to work either way, so I increased the value of “memory_limit” to fit my needs.
 * I hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)