Most modern databases optimize joins effectively regardless of table order in the FROM clause.
But some engines still produce different execution plans depending on how tables are arranged.
MicroStrategy handles this with the From Clause Order VLDB property under Joins.
Default Table Order in MicroStrategy
- Fact Tables
- Metric Qualification (MQ) Tables
- Relationship Tables
- Lookup Tables
SQL optimization and join planning concept
VLDB Setting View
From Clause Order options in MicroStrategy
From Clause Order Options
1) Normal FROM clause order (Default)
Uses the standard sequence:
- Fact Tables
- MQ Tables
- Relationship Tables
- Lookup Tables
2) Move last table to first
Moves the last table (usually a lookup table) to the beginning of the FROM clause. Useful in some Oracle workloads.
3) Move MQ table to last (for Redbrick)
Reorders tables as:
- Fact Tables
- Relationship Tables
- Lookup Tables
- MQ Tables
4) Reverse FROM clause order
Reverses the default sequence:
- Lookup Tables
- Relationship Tables
- MQ Tables
- Fact Tables
Important Note
From Clause Order mainly controls SQL syntax order, not report logic. Results should stay consistent across options. With inner joins, only table position changes. With one-sided outer joins, join direction may change when order is altered.
Comments
Post a Comment