I’m trying to search a custom post type of “Properties”, while doing so I’m also searching the custom fields using multiple (anywhere from 5-30) meta_queries. The problem is WordPress or MySQL is throwing an error saying I hit the limit of the amount of JOIN statements that can be used.

The 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]

Since I’m using WP_Query is it even possible to set those options? Any other ways I can get around this?

Read more here: WP_Query hit max joins… How else can I build a search function that uses custom fields?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , , ,

Wordpress related questions and answers: