[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::rdb_60

Title:Oracle Rdb - Still a strategic database for DEC on Alpha AXP!
Notice:RDB_60 is archived, please use RDB_70..
Moderator:NOVA::SMITHISON
Created:Fri Mar 18 1994
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5118
Total number of notes:28246

4975.0. "How to utilize ZIG-ZAG strategy" by M5::DDAYBERR () Tue Jan 28 1997 16:58

      
        According to the 6.1 RDB documentation, a zig-zag strategy
    is much more efficient that a match or cross, and that RDB would 
    need an index on the inner loop of the query to utilize a zig-zag
    strategy.   There must be more to it though, because I can't seem
    to get a zig-zag strategy --- what are the requirements/scenarios
    when RDB will/can use a zig-zag strategy??
    
                                      Debbie
    
    
T.RTitleUserPersonal
Name
DateLines
4975.1HOTRDB::PMEADPaul, [email protected], 719-577-8032Tue Jan 28 1997 17:541
    Did you read the internals book?
4975.2No additional informationM5::DDAYBERRWed Jan 29 1997 10:4515
        Of course!  
    
     Paul, I have what appears to be a 6.0 internals manual and pages
    4-8 and 4-9 talk about MATCH and CROSS  --- NO mention of ZIGZAG.
    
        I also have a 5.1 internals manual which does have data on the
    ZIGZAG strategy, but it gives no more hints than the Performance
    manual, which simply states the inner loop needs an index.  The
    7.0 Performance manual seems to indicate an index on either the 
    inner or outer loop will suffice.
    
    What's necessary to ensure RDB will use a  ZIGZAG.  
    
    
    
4975.3M5::LWILCOXChocolate in January!!Wed Jan 29 1997 12:4011
                       <<< Note 4975.2 by M5::DDAYBERR >>>
                         -< No additional information >-

    
>>    What's necessary to ensure RDB will use a  ZIGZAG.  
    
A sewing machine?

:-).    
    

4975.4NOVA::SMITHIDon&#039;t understate or underestimate Rdb!Wed Jan 29 1997 13:2615
This is what I got from the Optimizer folks...

The following conditions should be met to use the zigzag match:

1. Either outer or inner (or both) legs should use indexed retrieval.
2. There is no sort in either outer or lnner leg.
3. No full outer join.
4. No inner leg uses range list scan of hashed index.
	(e.g. a in (v1, v2, ..., vn) where a is column in hashed index)

I believe (1) describes Rdb7 where we exhanced zigzag for the outer leg.

If you post the example here with STRATEGY output we can see better...

Ian
4975.5debug flags on smaller query soonM5::DDAYBERRWed Jan 29 1997 16:3815
    
         
        Ian, thank-you very much for the details.  I checked the customer's
    code and he isn't doing a full outer join or a sort, and the index in
    use is sorted.  I've asked him to narrow down the scope of the
    statement though, because the SELECT statement in question, is a VIEW
    SELECT across two tables, but there are about 17 CASE WHEN EXISTS
    statements that validate data within the VIEW SELECT statement.  I've
    asked the customer to narrow this down to the original SELECT, and
    execute it outside of the VIEW and without the CASE statements, to see
    if we do the zig-zag strategy then.   He expects to be able to provide
    this data in 3 days.  
        Thanks again for the details.
    
                                                 Debbie