Kevin Wilfong
2011-03-18 15:00:32 UTC
In class yesterday we said that given an example like the following (I
don't remember it exactly)
select *
from emp e, manages m, dept d
where e.empno = m.empno
and d.deptno = m.deptno
order by e.empname and m.empno
then the interesting order from the order by clause was ((e.empname),
(e.empno, m.empno))
and ((e.empname)) alone is not an interesting order.
However, what if it was something like
select *
from emp e, manages m, dept d
where e.empno = m.empno
and d.deptno = m.deptno
order by e.empname and d.deptname
in which case the pathkey representing the order by clause would look
like ((e.empname), (d.deptname))
In this case, this order would not be applicable until higher up in the
plan tree, so would ((e.empname)) and/or ((d.deptname)) be considered
interesting orders for the purposes of this assignment?
don't remember it exactly)
select *
from emp e, manages m, dept d
where e.empno = m.empno
and d.deptno = m.deptno
order by e.empname and m.empno
then the interesting order from the order by clause was ((e.empname),
(e.empno, m.empno))
and ((e.empname)) alone is not an interesting order.
However, what if it was something like
select *
from emp e, manages m, dept d
where e.empno = m.empno
and d.deptno = m.deptno
order by e.empname and d.deptname
in which case the pathkey representing the order by clause would look
like ((e.empname), (d.deptname))
In this case, this order would not be applicable until higher up in the
plan tree, so would ((e.empname)) and/or ((d.deptname)) be considered
interesting orders for the purposes of this assignment?