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

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

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


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 
 

Online ASSM and RAC

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 Start 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.

 

SEE CODE DEPOT FOR FULL SCRIPTS


This is an excerpt from my latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts:

http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

 


 

 

  
 

 Oracle cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

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 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.