Title: get_users() cause memory problems
Last modified: December 1, 2017

---

# get_users() cause memory problems

 *  Resolved [yudge](https://wordpress.org/support/users/yudge/)
 * (@yudge)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/get_users-cause-memory-problems/)
 * On the free version in shortcode-builder.php, you are fetching the authors by
   using get_users(). This fetches all the users along with all the metadata. For
   a wp_usermeta table with 1 million rows, I had to allow 1 GB of memory limit 
   for the code to execute in like 30 seconds. Please do not fetch data like that.
   You guys can use a search box feature like WooCommerce does, in which you will
   get dynamic search results as uses type in the search criteria.

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

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/get_users-cause-memory-problems/#post-9742406)
 * Hi [@yudge](https://wordpress.org/support/users/yudge/),
    On the Easy Query settings
   page… check the “Disable dynamic population of categories, tags and authors in
   the Query Builder.” checkbox to disable this feature.
 * Cheers,
 *  Thread Starter [yudge](https://wordpress.org/support/users/yudge/)
 * (@yudge)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/get_users-cause-memory-problems/#post-9744306)
 * Thanks for the prompt reply. Hmm, yes that’d fix the issue; however, it does 
   take away the feature. Also I think it’d be beneficial if you guys highlight 
   this option on the settings page and explain a bit about it or even default to“
   Disable”, since at first glance I think very few would see the option there and
   most would just switch to another plugin when encountering this problem.
 * And it seems somehow your plugin silences the error. I had to step through the
   code using debugger and locate the issue. When I called get_users() in my own
   code, I got the php memory error displayed.

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

The topic ‘get_users() cause memory problems’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-query_939495.svg)
 * [Easy Query - WP Query Builder](https://wordpress.org/plugins/easy-query/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-query/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-query/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-query/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-query/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-query/reviews/)

## Tags

 * [get_users](https://wordpress.org/support/topic-tag/get_users/)

 * 2 replies
 * 2 participants
 * Last reply from: [yudge](https://wordpress.org/support/users/yudge/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/get_users-cause-memory-problems/#post-9744306)
 * Status: resolved