Ticket #5650 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

get_lastcommentmodified() query optimization

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

Description

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

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

Change History

ryan4 years ago

  • Keywords has-patch dev-reviewed added

+1

comment:2   ryan4 years ago

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

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

Note: See TracTickets for help on using tickets.