Sample Picasso Diagrams » QT21  (9 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 * 1919 x 1125 * (94KB)
Reduced Diagram (20%) * 1919 x 1125 * (95KB)
Cardinality Diagram * 1919 x 1125 * (98KB)
Cost Diagram * 1919 x 1125 * (98KB)
Plan1 * 1919 x 1125 * (69KB)
  Plan Diagram  
  Reduced Diagram (20%)  
  Cardinality Diagram  
  Cost Diagram  
  Plan1  
Plan2 * 1919 x 1125 * (71KB)
Plan3 * 1919 x 1125 * (76KB)
Plan4 * 1919 x 1125 * (74KB)
Plan5 * 1919 x 1125 * (73KB)
  Plan2  
  Plan3  
  Plan4  
  Plan5  
Album last updated on 2/9/09 9:59 PM
Powered by Jalbum 8.1 and BluPlusPlus skin
Indian Institute of Science