Good post/blog about "Oracle Star Transformation"?
hi,
Anyone know a good reference to understand "Oracle Star Transformation"?
Below Oracle blog seems to have typo when you compare Q1 and Q2 at the very beginning of the blog.
Optimizer Transformations: Star Transformation (oracle.com)
Unless I'm missing something, the Q2 at the beginning of the blog should look like this,
see <<<< LINE ADDED HERE >>>> for new lines, the rest is unchanged:
SELECT c.cust_city, t.calendar_quarter_desc, SUM(s.amount_sold) sales_amount FROM sales s, times t, customers c WHERE s.time_id = t.time_id AND s.cust_id = c.cust_id AND s.channel_id = ch.channel_id -- <<<<LINE ADDED HERE>>>> AND c.cust_state_province = 'CA' AND ch.channel_desc = 'Internet' -- <<<<LINE ADDED HERE>>>> AND t.calendar_quarter_desc IN ('1999-01','1999-02') AND s.time_id IN (SELECT time_id FROM times WHERE calendar_quarter_desc IN('1999-01','1999-02')) AND s.cust_id IN (SELECT cust_id FROM customers WHERE cust_state_province='CA') AND s.channel_id IN (SELECT channel_id FROM channels WHERE channel_desc = 'Internet') GROUP BY c.cust_city, t.calendar_quarter_desc;