These queries are the same – the only difference being the syntax. There’ll be no noticeable performance difference. I prefer the first for readability when it is formatted correctly.
(Also, the first query doesn’t use the paged
argument, so it won’t ‘paginate’ – but I guess that was omitted by mistake).
Related Posts:
- Differences Between WP_Query() and get_posts() for Querying Posts?
- 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?
- Slow SQL_CALC_FOUND_ROWS Query
- get_the_title($postID) OR get_the_title()?
- Stop all SQL_CALC_FOUND_ROWS wordpress queries
- Slow speed and high CPU usage for my code. How to improve it?
- Multiple queries on Home Page – page load/site speed issue
- WP_Query Performance Issues with meta_query
- Too many posts cause slow load when paginating
- WP_Query times out
- Improve wp query perfomance on large db
- reducing the amount of wp_query calls
- 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!
- Is it a good idea to improve meta query performance by adding tax query?
- Slow page loads due to WordPress Core Query
- Display tags with random thumbnail from selection of posts with that tag
- 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
- How to increase load time of an archive/search page (WP_Query)
- use of 10 new WP_Query : loading too slow (with url) [closed]
- Which is faster wpdb & get_row or wp_query & ge_post_meta?
- What is the best way (regarding performance) to set transients for logged in users?
- How to avoid filling up an array each time I run a WP_query?
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- Unusual high query of user meta data
- update_post_meta performance in a loop woocommerce
- update_post_meta performance in a loop woocommerce
- WP_Term_Query->get_terms() very slow query for WordPress filter
- Showing the correct number of posts_per_page when avoiding the use of post__not_in
- Calculating efficiently on large amount of data generated by wp_query
- Website goes slow down after importing long database
- Optimising amount of calls to custom fields
- Post OrderBy slow performance
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- How to query posts based on lat-lng coordinate as post meta?
- How to query only for products with status “in stock” in WooCommerce? [closed]
- WP_Query displaying ALL posts
- How to combine tax_query and date_query in WordPress
- wp_query display posts from same category of the post
- Targeting specific pages in the loop
- Order posts by meta value and Date
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- Show all parents and children in custom post type in right order
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Can you order posts from wp_query by two custom meta fields?
- Retreaving all images attached to current post
- Pagination working everywhere but the index page
- How do I search inside specific taxonomies in WordPress
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- How can you get first post, last post and post count in a category?
- What’s the purpose / logic of split_the_query in WP_Query->get_posts
- if statement in wp_query arguments
- Need wp_query to return all children and grandchildren
- How to use offset in WP_Query
- difference between like ‘%%%var%%’ and ‘%var%’
- WP Query Category Atribute Not Working
- How to build a WP_Query using mulitple tags and using AND or OR operator between them
- new WP_Query to get max price meta value not working
- wp_query should show stickies first
- WordPress custom post type with meta – how to retrieve with wp_query
- wordpress search word, “hello world” ===> ‘hello+world’ ===> ‘hello’, ‘world’
- Wp query show post by author name or post title or post content
- wordpress ajax relationship query
- Admin Page Post Id wp_reset_postdata not working
- Multiple queries and performance – wp_query
- Display single most recent post in category on every page of category archive
- Executing query_posts after wp_insert_post
- Redirect Search to Form When No Product Results Are Found
- Show menus to one admin username
- inserting content of 1 Post to in another with a template hierarchy
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Get the child category ID of current category
- Related Posts Excluding Certain Categories
- Unlimited Page Sitemap Link
- WP_Query orderby
- Using Ajax and WP_Query to load more posts on category page fails
- I have problems with the search query using multiple post types
- How to check if logged in user have pending custom post?
- How can I re-query post_type and rewrite the url?
- Different query result on local and server
- How can I show only last year posts in wordpress archive?
- Change database image location for transportability
- Combine Tax Archive and Meta_Query in WP_Query
- Get posts by birthday
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Pagination not working with WP_QUERY
- Custom Content Slider stop duplicate
- Sort Posts with custom meta key by default which is currently set as optional
- wp_query pagination links producing 404
- Carousel slider with WP_Query to show 3 posts on each slide
- how to use transient method?
- WP_Query – meta fields numeric
- Is there another way to retrieve a post_id from post_meta other than a SQL query?