Sample Picasso Diagrams » QT21  (20 Slides)     [Page 1 of 2] :: 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
  You have reached the first page You have reached the first page      Up one level      Next page Last page  

21.sql

Plan Diagram * 1920 x 1170 * (167KB)
Reduced Diagram (20%) * 1920 x 1170 * (161KB)
Cardinality Diagram * 1920 x 1170 * (165KB)
Cost Diagram * 1920 x 1170 * (167KB)
Plan1 * 1936 x 1186 * (103KB)
  Plan Diagram  
  Reduced Diagram (20%)  
  Cardinality Diagram  
  Cost Diagram  
  Plan1  
Plan2 * 1936 x 1186 * (105KB)
Plan3 * 1936 x 1186 * (109KB)
Plan4 * 1936 x 1186 * (103KB)
Plan5 * 1936 x 1186 * (102KB)
Plan6 * 1936 x 1186 * (109KB)
  Plan2  
  Plan3  
  Plan4  
  Plan5  
  Plan6  
Plan7 * 1936 x 1186 * (111KB)
Plan8 * 1936 x 1186 * (109KB)
Plan9 * 1936 x 1186 * (109KB)
Plan10 * 1936 x 1186 * (103KB)
Plan11 * 1936 x 1186 * (111KB)
  Plan7  
  Plan8  
  Plan9  
  Plan10  
  Plan11  
Album last updated on 2/9/09 9:58 PM
Powered by Jalbum 8.1 and BluPlusPlus skin
Indian Institute of Science