WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12557 closed defect (bug) (fixed)

get_boundary_post() causes slow SQL_CALC_FOUND_ROWS query.

Reported by: ryan Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.2
Component: Performance Keywords:
Focuses: Cc:

Description

get_boundary_post() should pass no_paging to get_posts() so that it doesn't trigger a pointless and slow SQL_CALC_FOUND_ROWS query.

Change History (2)

comment:1 ryan4 years ago

nopaging turns off limits entirely. WP_Query::get_posts() needs some rework to allow limiting the number of posts without turning on found rows.

comment:2 automattor4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13647]) Add no_found_rows argument to WP_Query::get_posts() to allow forcibly defeating SQL_CALC_FOUND_ROWS. Use no_found_rows for the query in get_boundary_post(). fixes #12557

Note: See TracTickets for help on using tickets.