Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#5650 closed defect (bug) (fixed)

get_lastcommentmodified() query optimization

Reported by: ryan Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3.2
Component: General Keywords: has-patch dev-reviewed
Focuses: Cc:


get_lastcommentmodified() selects on comment_date_gmt <= $now. comment_data_gmt is not indexed, making this a slow query. I don't see any reason for doing <= $now. Comments can be edited to be in the future; however, future comments are not excluded from any other query. They show in the comments loop.

Attachments (1)

get_lastcommentmodified.diff (2.2 KB) - added by ryan 8 years ago.

Download all attachments as: .zip

Change History (3)

#1 @westi
8 years ago

  • Keywords has-patch dev-reviewed added


#2 @ryan
8 years ago

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

(In [6610]) Eliminate comment_date_gmt <= now from get_lastcommentmodified() queries. fixes #5650

Note: See TracTickets for help on using tickets.