The shop I’m looking after also has a lot of large queries and for us, the solution was a WP optimised hosting provider with litespeed caching and sufficient resources (RAM) to handle the query.
And for queries which are always the same, I also use transients. With transients, the query runs only once and is then stored until the transient expires. See https://developer.wordpress.org/apis/handbook/transients/. The first query will still take time; but subsequent visitors can use the stored query result.
Related Posts:
- How to prevent execution of default query, while preserving ability to use WP_Query in template?
- Slow SQL_CALC_FOUND_ROWS Query
- Stop all SQL_CALC_FOUND_ROWS wordpress queries
- WordPress Query is taking more then 20 second and stuck on creating index
- Which is faster wpdb & get_row or wp_query & ge_post_meta?
- WordPress Query optimaization for slow query
- Optimising amount of calls to custom fields
- Return only Count from a wp_query request?
- Use REGEXP in WP_Query meta_query key
- Set Alias for meta_query arguments in get_posts()
- Order by DESC, ASC in custom WP_Query
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- What is the most efficient way of querying posts based on visits and date for current day?
- Is it true $wpdb->get_results is faster than WP_Query in most cases?
- Get posts by menu ID
- SQL query equivalent to WP User Query
- What’s wrong with this WP query?
- How to count post meta key values for all posts in database
- Group posts by meta_key
- WP_Query hit max joins… How else can I build a search function that uses custom fields?
- Would this post meta be better added to the post table rather than post_meta table
- Slow speed and high CPU usage for my code. How to improve it?
- Multiple queries on Home Page – page load/site speed issue
- Order By Multiple Meta Fields
- meta_query on a date range using an array of values
- WP_Query Performance Issues with meta_query
- How to speed up wp_query, took more 5s to run against 100k posts
- Too many posts cause slow load when paginating
- Mysql query LIKE not working
- How to get posts on a specific date – WP Query
- Using WP_Query and WP_Meta_Query Outside of WordPress
- WP_Query times out
- Looking for most performant way to execute several similar WP queries within shortcodes
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Order by custom table and multiplication
- Single meta_query query using OR instead of AND in request’s WHERE statement
- reducing the amount of wp_query calls
- why update and delete query not worked in custom table?
- Slow WP_Query for custom post type
- Performance when getting post meta for post retrieved by meta value
- Hide Administrators From User List except current user (administrator)
- Mysql query and order meta value
- Help with WP_Query – Too many mySQL queries
- Using hook to use DISTINCT in a wp_query
- pagination with ‘no_found_rows’ => true,
- Improve performance by removing unnecessary database queries
- How to show optimized list of posts with all their attachment images
- Slow page loads due to WordPress Core Query
- Display tags with random thumbnail from selection of posts with that tag
- Query posts without meta preload
- How to implement a new row_count method in WordPress?
- Should wp_query automatic meta and term cache priming be used in an enviroment with an object caching
- Loop Performance > JSON files vs. WP_Query vs. REST API
- Wp query show post by author name or post title or post content
- How to increase load time of an archive/search page (WP_Query)
- Query most popular terms by taxonomy over 2 week period
- use of 10 new WP_Query : loading too slow (with url) [closed]
- how update data through ajax and jquery
- Meta Query doesn’t works as espected
- What is the best way (regarding performance) to set transients for logged in users?
- how to get Nearby zipcode
- How I can change the condition or compare operator for WP_Query in pre_get_posts
- mysql query order by
- Function to retrieve IDs of posts, cache results, and improve wp_query
- How to avoid filling up an array each time I run a WP_query?
- Query multiple meta key values for template
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- get_var is neither a string, integer, or array …?
- Optimising WP_Query with ACF Fields
- SQL query injection with fifu image
- WP Query – grouping posts by same meta key, adding together values from another key
- Woocommerce Get Orders By Meta Value
- SQL to join u3g_users & u3g_meta_value with repeating data
- INNER JOIN custom tables – SQL Query
- use mysql variable in a $wpdb->query to reindex a column?
- One of two similar WP Query is very slow
- Fix wp_term_relationships slow query in get_posts
- Unusual high query of user meta data
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- Sorting query_posts() with a complex orderby filter
- Case insensitive ORDERBY in wpquery
- WP_Term_Query->get_terms() very slow query for WordPress filter
- Query postmeta based on meta_value, return array of post_id
- Order Posts By Custom Field That is an array of objects
- Calculating efficiently on large amount of data generated by wp_query
- Slow query when selecting with large meta query or post__in
- Website goes slow down after importing long database
- WP_Query always returning the last custom post
- Optimize WP_Query
- ordering and optimizing functions
- Get a list of the last posts grouped by author and filtered by category
- Post OrderBy slow performance
- meta_query dates from an array
- Different sql queries count indicator on the main page [closed]
- WordPress query very slow on +/- 300k DB entries and 7 INNER JOIN
- SQL query into to WP query
- Bulk delete comments, foreach loop
- WordPress – Optimize the Meta Query for 3 meta keys at a time