Sample Picasso Diagrams » QT21  (10 Slides)     [Page 1 of 1] :: Jump To  
Query Template

select
    s_name,
    count(*) as numwait
from
    supplier,
    lineitem l1,
    orders,
    nation
where
    s_suppkey = l1.l_suppkey
    and o_orderkey = l1.l_orderkey
    and o_orderstatus = 'F'
    and exists (
        select
            *
        from
            lineitem l2
        where
            l2.l_orderkey = l1.l_orderkey
            and l2.l_suppkey <> l1.l_suppkey
    )
    and not exists (
        select
            *
        from
            lineitem l3
        where
            l3.l_orderkey = l1.l_orderkey
            and l3.l_suppkey <> l1.l_suppkey
            and l3.l_receiptdate > l3.l_commitdate
    )
    and s_nationkey = n_nationkey
    and s_acctbal :varies
    and l1.l_extendedprice :varies
    and n_name = 'SAUDI ARABIA'
group by
    s_name
order by
    numwait desc,
    s_name

Optimizer Diagrams
  Up one level  
Plan Diagram * 1920 x 1170 * (161KB)
Reduced Diagram (20%) * 1920 x 1170 * (160KB)
Cardinality Diagram * 1920 x 1170 * (164KB)
Cost Diagram * 1920 x 1170 * (162KB)
Plan1 * 1920 x 1170 * (126KB)
  Plan Diagram  
  Reduced Diagram (20%)  
  Cardinality Diagram  
  Cost Diagram  
  Plan1  
Plan2 * 1920 x 1170 * (130KB)
Plan3 * 1920 x 1170 * (126KB)
Plan4 * 1920 x 1170 * (117KB)
Plan5 * 1920 x 1170 * (118KB)
Plan6 * 1920 x 1170 * (117KB)
  Plan2  
  Plan3  
  Plan4  
  Plan5  
  Plan6  
Album last updated on 2/9/09 9:58 PM
Powered by Jalbum 8.1 and BluPlusPlus skin
Indian Institute of Science