I’m sure there are more sophisticated ways to debug the queries, but I’m not aware of them. So usually when I need to debug WP queries I use either Query Monitor or Debug Bar (with Slow Actions addon) plugin, which can be found on the wordpress.org plugin repository. These plugins help you trace which functions / plugins are slowing the site down. At least for me these plugins have been great help.
I’m not affiliated to any of these plugins and my apologies for giving just a plugin recommendation answer.
Related Posts:
- Is it a good idea to improve meta query performance by adding tax query?
- Meta_query on same meta key, with diffrenct values
- query post by author gender
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Get all user with both meta_value
- Meta_query compare operator explanation
- Nested meta_query with multiple relation keys
- meta_query ‘compare’ => ‘IN’ not working
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query with checkbox meta_query
- ACF Relationship Field Search Filtering [closed]
- 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?
- Query Multiple Post types each with own meta query
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Meta Query with date and time on the same Day before given time
- How to grab metabox value in wp_query meta_query key
- Searching user meta using WP_User_Query
- Is “orderby” in WP Meta Query conflicting with Meta Query?
- Stop all SQL_CALC_FOUND_ROWS wordpress queries
- How can I create a WP_Query that returns posts where one meta_value
- WP Meta Query for some meta (array) values
- Sort users by meta_value_num
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Using WP Query to search within ALL keys in meta query
- WP Query – Get WooCommerce Products with variation that is in stock
- Meta_query with or without value
- wp_query not searching with apostrophe
- Minimize database queries to user tables?
- Add condition of user capability in WP_query
- Custom query based on meta key – Reduce three states to two in results?
- How to make Meta Query case sensitive?
- Performance when getting post meta for post retrieved by meta value
- Any number in meta key (wp query)
- Fastest way of counting posts of a custom post type in a specific taxonomy term?
- Use more than one query, but prevent duplicates – at scale!
- How to display multiple custom fields with the same meta_key in an ascending order?
- Meta_query with multiple keys and multiple values
- Modify wp-query and sort by post meta key
- Tax query AND/OR meta query [duplicate]
- Orderby listing issue
- Help ordering Post loop by two meta values
- How to increase load time of an archive/search page (WP_Query)
- Make meta query treat meta_value as 1 or 0
- Is this meta query problematic?
- WP Query Meta Value – How To Identify Specific, Unique Values?
- Order by meta_key doesn’t work
- Appending to existing WP_Query’s meta_query if exists
- Multiple meta_key ordering with pre_get_posts
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Custom query filter by ACF date custom field
- Nested array issue in meta_query
- Error in meta_query not get result
- Meta query with compare by more than 2 fields
- How to get current page nearest parent id?
- Why doesn’t my WP Meta Query return any results?
- WP_Query meta compare must include ALL array values
- meta_query returning excluded result
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- meta_query weird behaviour, static int will work, but not user data
- Creating a query that get all posts but places meta items first
- get_posts query is taking about 40 seconds to execute
- wp query to use both author id and meta_query
- Counting instances of words in the results of a post query
- meta_query – check for multiple meta values in key which holds an array of values
- WP_Query for a taxonomy value OR a custom post type meta field
- Usermeta data unserialize, extract and display in table in WordPress
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- Meta query orderby meta_value_num sorting by role first
- WP_Query on custom key and value
- Get posts having meta value between two numbers
- wordpress multiple meta value query is not working
- Strange results from WP_Query
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Pre get posts sort by meta key returns no results if meta key does not exist
- Sorting with meta_query and multiple, optional meta keys
- meta_query with relation = AND not working as expected when combining EQUALS with NOT EQUALS
- WP Query for Multiple Post Types
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- WP_User_Query not searching numbers?
- Calculating efficiently on large amount of data generated by wp_query
- Orderby query does not work for custom fields even with meta query
- make query more simplest and in one query
- WP_Query returns empty if meta_query has more than 7 values
- Use not custom fields in get_posts() meta_query?
- Compare meta key separation
- WordPress meta_query not working
- Using orderby with 2 meta keys
- Passing conditional arrays to WP_Query() [closed]
- WordPress Query Default Order if Meta Values Same?
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Wp query by 2 meta field – check if they exists / have value
- Using ‘meta_query’ with the ‘pre_get_posts()’ hook disables searching for post titles
- Get posts using multiple values from ACF checkbox as meta query wordpress
- get_post_meta bringing back results, but $wpdb->postmeta doesn’t
- Custom query with custom filtering returning incorrect results
- WP Query returning all posts when Meta_query is null