SQL Performance (MOSC)

MOSC Banner

Good post/blog about "Oracle Star Transformation"?

edited Jun 6, 2023 3:35AM in SQL Performance (MOSC) 11 commentsAnswered ✓

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;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center