Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle STAR Transformation tips


Oracle Tips by Burleson Consulting

Oracle STAR Transformations and SQL

To enable a data warehouse, the following suggested initialization parameter settings might be used:

§         cursor_space_for_time=TRUE

§         db_cache_size=XXX

§         db_block_size=32

§         db_file_multiblock_read_count=64

§         filesystemio_options=ASYNC

§         pga_aggregate_target=XXX

§         optimizer_index_cost_adj=XXX

§         optimizer_index_caching=XXX

§         query_rewrite_enabled=TRUE

§         shared_pool_size=150M

§        star_transformation_enabled=TRUE

§         workarea_size_policy=AUTO

§         session_cached_cursors=100

§         log_buffer=XXX

§         bitmap_merge_area_size=XXX

§         create_bitmap_area_size=XXX

For star_transformation join plans, the following parameters must also be considered:

§        star_transformation_enabled= TRUE

§         No hint STAR: So forcing a star_query excludes star_transformation

§         No BIND VARIABLE in SELECT statement

§         No CONNECT BY and start with

§         For fact table columns involved in EQUIJOIN predicate, there must be bitmap index defined on them.

§         More than 2 bitmap index on fact table

§         Fact table must have more than 15,000 rows

§         Fact table cannot be a view

§         Fact table can not be a remote table

§         No hint FULL on fact table

Failure to set proper parameters can result in a botched attempt to initiate a star_transformation join as shown by the following example.

Bad Star Transformation Plan

The following is an example of a failed attempt at a star_transformation join:

 

ALTER SESSION SET _always_star_transformation= TRUE;

 

select /*+ star_transformation X "star_transformation"  */ wdate, hour, minute, sum(bytes) from

network_fact nf,

date_dimension ddi,

hour_dimension hdi,

minute_dimension mdi

where

nf.date_key=ddi.date_key

and nf.hour_key=hdi.hour_key

and nf.minute_key=mdi.minute_key

and wdate>=to_date('2004/10/14 21', 'yyyy/mm/dd hh24')

and wdate<=to_date('2004/10/15 21', 'yyyy/mm/dd hh24')

group by wdate, hour, minute;

 

Execution Plan

----------------------------------------------------------

    0      SELECT STATEMENT Optimizer=CHOOSE

    1    0   SORT (GROUP BY)

    2    1     HASH JOIN

    3    2       TABLE ACCESS (FULL) OF 'MINUTE_DIMENSION'

    4    2       HASH JOIN

    5    4         MERGE JOIN (CARTESIAN)

    6    5           TABLE ACCESS (FULL) OF 'DATE_DIMENSION'

    7    5           BUFFER (SORT)

    8    7             TABLE ACCESS (FULL) OF 'HOUR_DIMENSION'

    9    4         TABLE ACCESS (FULL) OF 'NETWORK_FACT'

Good Star Transformation Plan

The following is what a successful star_transformation join looks like:

 

Execution Plan

----------------------------------------------------------

    0      SELECT STATEMENT Optimizer=CHOOSE

    1    0   NESTED LOOPS

    2    1     HASH JOIN

    3    2       HASH JOIN

    4    2       TABLE ACCESS (FULL) OF 'MINUTE_DIMENSION'

    5    2     PARTITION CONCATENATED

    6    2        TABLE ACCESS BY ROWID 

    7    2          BITMAP CONVERSION TO ROWIDS

    8    2        BITMAP AND

    9    2        BITMAP MERGE

   10    2        BITMAP KEY ITERATION

   11    2        SORT BUFFER

   12    2       TABLE ACCESS (FULL) OF 'MINUTE_DIMENSION'

               BITMAP INDEX RANGE SCAN I_C1

               BITMAP MERGE

               BITMAP KEY ITERATION

               SORT BUFFER

             TABLE ACCESS ... D2

              BITMAP INDEX RANGE SCAN I_C2

BITMAP MERGE

BITMAP KEY ITERATION

SORT BUFFER

TABLE ACCESS ... D3

BITMAP INDEX RANGE SCAN I_C3

TABLE ACCESS ... D2

TABLE ACCESS BY ... D3

 

The execution plan looks like:

 

SELECT STATEMENT C=301

NESTED LOOPS

HASH JOIN

HASH JOIN

TABLE ACCESS ... D1

PARTITION CONCATENATED

TABLE ACCESS BY ROWID F

BITMAP CONVERSION TO ROWIDS

BITMAP AND

BITMAP MERGE

BITMAP KEY ITERATION

SORT BUFFER

TABLE ACCESS ... D1

BITMAP INDEX RANGE SCAN I_C1

BITMAP MERGE

BITMAP KEY ITERATION

SORT BUFFER

TABLE ACCESS ... D2

BITMAP INDEX RANGE SCAN I_C2

BITMAP MERGE

BITMAP KEY ITERATION

SORT BUFFER

TABLE ACCESS ... D3

BITMAP INDEX RANGE SCAN I_C3

TABLE ACCESS ... D2

TABLE ACCESS BY ... D3

 

This means that with:

§         (select C1_1 from D1 where D1.C1_2 op constant1), a bitmap B1 using I_C1 is generated.

§         (select C2_1 from D2 where D1.C2_2 op constant2), a bitmap B2 using I_C2 is generated.

§         (select C3_1 from D3 where D1.C3_2 op constant3), a bitmap B3 using I_C3 is generated.

Next, the DBA performs an AND between those bitmaps.  At the end, those rows from F with rowid coming from bitmap merging are taken.

[http://www.dba-oracle.com/include_SQL_Tuning_book.htm]

SEE CODE DEPOT FOR FULL SCRIPTS


   

 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational