Opened 5 months ago
Last modified 3 months ago
#57416 assigned enhancement
Do not split query if requesting one post
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Query | Keywords: | good-first-bug needs-patch |
Focuses: | performance | Cc: |
Description
When using WP_Query and requesting posts_per_page = 1, there is little to no value in splitting the query and priming posts using _prime_post_caches. This results in one query to get the posts and another to prime it. This means two database queries when this could simply be one.
Note: See
TracTickets for help on using
tickets.