Ticket #665 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

SQL_CALC_FOUND_ROWS can do terrible things to large sites

Reported by: mdawaffe Owned by:
Priority: high Milestone: 0.8.3
Component: Back-end Version: 0.8.2
Severity: major Keywords: bb_query
Cc:

Description

The WordPress.org support forums were brought to their knees by SQL_CALC_FOUND_ROWS.

Many of the native functions don't need it either. We already know how many topics there are in a certain forum, for example ($bbdb->forums.topics).

Perhaps with the new BB_Query class, we can turn found_rows off by default. The on switch could tell it to use either SQL_CALC_FOUND_ROWS and FOUND_ROWS() or COUNT (*) depending on which is more appropriate.

Change History

(In [866]) go back to $bb_last_countable_query. Fixes #666. See #665

(In [867]) Back out [827] in branches/0.8. Fixes #666. See #665

(In [868]) bring back last_query functionality to bb_count_last_query(). See #665.

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

(In [893]) tweak bb_view_query(). Kill SQL_CALC_FOUND_ROWS by default. New count BB_Query param. Fixes #665

Note: See TracTickets for help on using tickets.