Opened 2 years ago

Closed 2 years ago

#17203 closed enhancement (fixed)

Recent Posts widget should set 'no_found_rows' => true

Reported by: scribu Owned by: ryan
Priority: normal Milestone: 3.2
Component: Performance Version:
Severity: normal Keywords: has-patch
Cc:

Description

WP_Widget_Recent_Posts calls WP_Query, but doesn't need the total number of posts.

Therefore, it should set 'no_found_rows' => true to make the query faster.

Even with #17195, this should still be done, to avoid SQL_FOUND_ROWS.

Attachments (1)

17203.diff (644 bytes) - added by scribu 2 years ago.

Download all attachments as: .zip

Change History (2)

scribu2 years ago

comment:1   ryan2 years ago

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

In [17825]:

Pass no_found_rows to query in recent posts widget. Props scribu. fixes #17203

Note: See TracTickets for help on using tickets.