Skip to:

Opened 10 years ago

Closed 7 years ago

#5448 closed enhancement (no action required)

Remove SQL Hints from Activities class

Reported by: zippykid's profile zippykid Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.9.2
Component: Activity Keywords:


This ticket is the result of a discussion here:

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;

Change History (6)

#1 @boonebgorges
10 years ago

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

Thanks, zippykid.

#2 @boonebgorges
10 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

See #5448

#3 @boonebgorges
10 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
10 years ago

  • Milestone changed from 2.1 to 2.2

#5 @DJPaul
10 years ago

  • Milestone changed from 2.2 to Future Release

#6 @boonebgorges
7 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.