Title: SET SQL_BIG_SELECTS=1?
Last modified: February 1, 2018

---

# SET SQL_BIG_SELECTS=1?

 *  Resolved [destabilizator](https://wordpress.org/support/users/destabilizator/)
 * (@destabilizator)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/)
 * Apparently I need to set SET SQL_BIG_SELECTS=1 so your plugin can work, how can
   one do that?

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

 *  Plugin Author [pimwick](https://wordpress.org/support/users/pimwick/)
 * (@pimwick)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926750)
 * Hello,
 * We automatically call this from the plugin before performing the filter. Are 
   you encountering a specific error? We may be able to guide you to the resolution
   if you can paste the error message here for us. Thanks!
 *  Thread Starter [destabilizator](https://wordpress.org/support/users/destabilizator/)
 * (@destabilizator)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926788)
 * Hi,
    I’m getting `WordPress database error: [The SELECT would examine more than
   MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE
   =# if the SELECT is okay]
 * That is when my search returned 24 rows and I’ve edited few values and pressed
   Save Changes.
    -  This reply was modified 8 years, 3 months ago by [destabilizator](https://wordpress.org/support/users/destabilizator/).
 *  Plugin Author [pimwick](https://wordpress.org/support/users/pimwick/)
 * (@pimwick)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926824)
 * Can you perform the following steps to help us isolate exactly which query is
   throwing this error? We set SQL_BIG_SELECTS on the main query, however it’s possible
   this is happening elsewhere.
 * 1. Log into your FTP site and edit wp-config.php
    2. Set the following values
   to “true” (add the lines if they don’t exist): define(‘WP_DEBUG’, true); define(‘
   WP_DEBUG_LOG’, true); 3. Return to the plugin and perform the steps to trigger
   the error. 4. Now go back to FTP and download this file: /wp-content/debug.log
   5. Return to wp-config.php and set DEBUG back to false (reverting the changes
   made in Step 2) 6. Review the debug.log file and look for any entries for pw-
   bulk-edit.php
 * Let me know if you have any questions!
 *  Thread Starter [destabilizator](https://wordpress.org/support/users/destabilizator/)
 * (@destabilizator)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926838)
 * Well under the error message there’s the query printed, that’s what you are after?(
   I can get to FTP when I get home)
 * `SELECT post.ID, regular_price.meta_value AS _regular_price, sale_price.meta_value
   AS _sale_price, sale_price_dates_from.meta_value AS _sale_price_dates_from, sale_price_dates_to.
   meta_value AS _sale_price_dates_to FROM wordpress_posts AS post LEFT JOIN wordpress_postmeta
   AS regular_price ON (regular_price.post_id = post.ID AND regular_price.meta_key
   = ‘_regular_price’) LEFT JOIN wordpress_postmeta AS sale_price ON (sale_price.
   post_id = post.ID AND sale_price.meta_key = ‘_sale_price’) LEFT JOIN wordpress_postmeta
   AS sale_price_dates_from ON (sale_price_dates_from.post_id = post.ID AND sale_price_dates_from.
   meta_key = ‘_sale_price_dates_from’) LEFT JOIN wordpress_postmeta AS sale_price_dates_to
   ON (sale_price_dates_to.post_id = post.ID AND sale_price_dates_to.meta_key = ‘
   _sale_price_dates_to’) WHERE post.ID IN (234)
 *  Plugin Author [pimwick](https://wordpress.org/support/users/pimwick/)
 * (@pimwick)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926886)
 * Thank you for the additional information. We found that this query is during 
   the save, so we are testing the new query with SQL_BIG_SELECTS here. We should
   have an update within the next 30 minutes, I will let you know when it is available.
 *  Plugin Author [pimwick](https://wordpress.org/support/users/pimwick/)
 * (@pimwick)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9926982)
 * We just released v2.43 which adds a call to SQL_BIG_SELECTS prior to performing
   the save. Let me know if this resolves the issue you’re having.
 *  Thread Starter [destabilizator](https://wordpress.org/support/users/destabilizator/)
 * (@destabilizator)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9933472)
 * It seems to work, thanks!
    -  This reply was modified 8 years, 3 months ago by [destabilizator](https://wordpress.org/support/users/destabilizator/).

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

The topic ‘SET SQL_BIG_SELECTS=1?’ is closed to new replies.

 * ![](https://ps.w.org/pw-bulk-edit/assets/icon-256x256.png?rev=1493564)
 * [PW WooCommerce Bulk Edit](https://wordpress.org/plugins/pw-bulk-edit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pw-bulk-edit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pw-bulk-edit/)
 * [Active Topics](https://wordpress.org/support/plugin/pw-bulk-edit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pw-bulk-edit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pw-bulk-edit/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [destabilizator](https://wordpress.org/support/users/destabilizator/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/set-sql_big_selects1/#post-9933472)
 * Status: resolved