Title: Problem with searchfunction
Last modified: March 26, 2026

---

# Problem with searchfunction

 *  [mikhistorik2026](https://wordpress.org/support/users/mikhistorik2026/)
 * (@mikhistorik2026)
 * [2 months ago](https://wordpress.org/support/topic/problem-with-searchfunction/)
 * Error message:
 * 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]
   `SELECT SQL_CALC_FOUND_ROWS
   DISTINCT www_posts.ID FROM www_posts INNER JOIN www_postmeta AS a ON ( a.post_id
   = www_posts.ID ) LEFT JOIN www_postmeta AS b ON ( (( b.post_id = a.post_id ))
   AND (( b.meta_key LIKE CONCAT( '\_', a.meta_key ) )) ) LEFT JOIN www_postmeta
   AS acsort_postmeta ON www_posts.ID = acsort_postmeta.post_id AND acsort_postmeta.
   meta_key = '_thumbnail_id' WHERE 1=1 AND ( ( ( b.meta_id IS NOT NULL ) AND ( 
   a.meta_value LIKE '%mats%' ) ) OR ( ( www_posts.post_title LIKE '%mats%' ) OR(
   www_posts.post_excerpt LIKE '%mats%' ) OR ( www_posts.post_content LIKE '%mats%')))
   AND ((www_posts.post_type = 'spelare' AND (www_posts.post_status = 'publish' 
   OR www_posts.post_status = 'acf-disabled' OR www_posts.post_status = 'future'
   OR www_posts.post_status = 'draft' OR www_posts.post_status = 'pending' OR www_posts.
   post_status = 'private'))) GROUP BY www_posts.ID ORDER BY CASE WHEN acsort_postmeta.``
   meta_value` IS null THEN 1 WHEN acsort_postmeta.`meta_value` = '' THEN 1 ELSE
   0 END , acsort_postmeta.`meta_value` ASC , www_posts.ID ASC LIMIT 0, 20
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-searchfunction%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [2 months ago](https://wordpress.org/support/topic/problem-with-searchfunction/#post-18864118)
 * Hi [@mikhistorik2026](https://wordpress.org/support/users/mikhistorik2026/),
 * Thank you for your message.
 * Unfortunately, I can’t help you in this situation. Your hosting imposes very 
   strict limits on SQL queries. In our plugin’s case, the query must be more complex–
   it can’t be reduced because searching across ACF fields would then not work.
 * Best,
    Mateusz

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-searchfunction%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/acf-better-search/assets/icon-256x256.png?rev=2636287)
 * [ACF: Better Search](https://wordpress.org/plugins/acf-better-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-better-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-better-search/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-better-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-better-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-better-search/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * Last activity: [2 months ago](https://wordpress.org/support/topic/problem-with-searchfunction/#post-18864118)
 * Status: not resolved