Difference between revisions of "Straight Join"

From SmartWiki
Jump to: navigation, search
(Redirected page to Straight Join Report Option)
 
Line 1: Line 1:
#REDIRECT [[Straight Join Report Option]]
+
 
 +
The '''Straight Join''' options on the [[:Category:Reports|Report]] settings page changes the way the system builds the report from the database.
 +
 
 +
Some reports will open faster if they are built with straight join option enabled. It’s difficult to to identify which reports (otherwise we’d do it automatically).
 +
 
 +
In particular reports that meet one or more of the following criteria are more likely to perform better with '''Straight Join''' enabled:
 +
* Large reports with multiple tables
 +
* Reports with a large number of custom fields (more than 12 or 15)
 +
* Reports with '''Tracking Activities''' (Level 2) as the primary table.
 +
 
 +
 
 +
It is best practice to build reports with those attributes both with Straight Join enabled, and then disabled and evaluate which option has a faster response when viewing the report.
 +
 
 +
'''Important:''' if the '''Straight Join''' option is enabled or disabled, the report must be rebuilt before the change will take effect.
 +
 
 +
 
 +
'''Technical Details:'''
 +
* MYSQL5 has a process to optimize queries that in some cases actually reduces the performance. This is a known issue with MYSQL5
 +
* Enabling the straight join prevents MYSQL from trying to optimize the query and runs it exactly as provided by the system.
 +
 
 +
 
 +
 
 +
 
 +
[[Category:Reports]]

Revision as of 16:17, 21 April 2011

The Straight Join options on the Report settings page changes the way the system builds the report from the database.

Some reports will open faster if they are built with straight join option enabled. It’s difficult to to identify which reports (otherwise we’d do it automatically).

In particular reports that meet one or more of the following criteria are more likely to perform better with Straight Join enabled:

  • Large reports with multiple tables
  • Reports with a large number of custom fields (more than 12 or 15)
  • Reports with Tracking Activities (Level 2) as the primary table.


It is best practice to build reports with those attributes both with Straight Join enabled, and then disabled and evaluate which option has a faster response when viewing the report.

Important: if the Straight Join option is enabled or disabled, the report must be rebuilt before the change will take effect.


Technical Details:
* MYSQL5 has a process to optimize queries that in some cases actually reduces the performance. This is a known issue with MYSQL5
* Enabling the straight join prevents MYSQL from trying to optimize the query and runs it exactly as provided by the system.