Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 9 years ago

#5448 closed enhancement (no action required)

Remove SQL Hints from Activities class

Reported by: zippykid Owned by:
Priority: normal Milestone:
Component: Activity Version: 1.9.2
Severity: normal 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
12 years ago

  • Component CoreActivity
  • Milestone Awaiting Review2.0

Thanks, zippykid.

#2 @boonebgorges
12 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
12 years ago

  • Milestone 2.02.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
12 years ago

  • Milestone 2.12.2

#5 @DJPaul
12 years ago

  • Milestone 2.2Future Release

#6 @boonebgorges
9 years ago

  • Milestone Future Release
  • Resolutioninvalid
  • Status newclosed

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

Note: See TracTickets for help on using tickets.