Re: Extending my question. Was: The relational model and relationalalgebra - why did SQL become the industry standard?
Date: 14 Feb 2003 23:14:05 -0800
> Some operations on relations require an explicit order: quota query, min,
> max etc. Using physical order in the representation of relations can
> sometimes speed the evaluation of unordered operations like joins.
I agree with this posting on most accounts, but I would like to point out that min and max do not need explicite ordering of rows, just an ordering of the elements of the domain, e.g.
select distinct salary
from personnel p
where not exists
( select *
from personnel p2 where p2.salary > p.salary )
Obviously the DBMS would not convert max to such an expression, but just order the rows or use an index.
Lauri Pietarinen Received on Sat Feb 15 2003 - 08:14:05 CET