Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 5 years ago

#5448 closed enhancement (no action required)

Remove SQL Hints from Activities class

Reported by: zippykid Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.9.2
Component: Activity Keywords:
Cc:

Description

This ticket is the result of a discussion here: http://buddypress.org/support/topic/performance-issues-with-the-wp_bp_activities-table/

Basically, I think it would be good if the SQL hint should be removed from the query in the activities class that returns a COUNT() .

Some tests and results of EXPLAIN are provided here; https://gist.github.com/vidluther/9370018

Change History (6)

#1 @boonebgorges
8 years ago

  • Component changed from Core to Activity
  • Milestone changed from Awaiting Review to 2.0

Thanks, zippykid.

#2 @boonebgorges
8 years ago

In 8071:

Streamline COUNT query in BP_Activity_Activity::get

It's unnecessary to use an ORDER BY clause when counting, and the index hint
was doing more harm than good, especially in cases where a specific ID was
passed.

See #5448

#3 @boonebgorges
8 years ago

  • Milestone changed from 2.0 to 2.1

OK, the index hint is removed from the count query. I think we probably should remove it from the other query as well, but this is something I can't investigate right now, so I'm going to move this ticket to the next milestone so there's more time for benchmarking and testing.

#4 @DJPaul
7 years ago

  • Milestone changed from 2.1 to 2.2

#5 @DJPaul
7 years ago

  • Milestone changed from 2.2 to Future Release

#6 @boonebgorges
5 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

There's no index hint in use in either place anymore.

Note: See TracTickets for help on using tickets.