WP Query slows down extremly when using more than 7 meta_queries
-
0
I build a site with an advanced real estate search via ajax. The search works fine. But when there are more than seven meta_queries, the query really slows down extremly.
I did some speed tests. Using 7 meta queries: 3 seconds, 8 meta queries: 22 seconds, 9 meta queries: 36 seconds.
This is the code I am using for adding the real estate options to the query.
if (null !== ($_POST['du']) && $_POST['du'] != 0) { $args['meta_query'][] = array( 'key' => 'badezimmer', 'value' => sanitize_text_field($_POST['du']), 'type' => 'numeric', 'compare' => '>=' ); }
Is there something I can do to optimize the speed?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP Query slows down extremly when using more than 7 meta_queries’ is closed to new replies.