Re: Extending my question. Was: The relational model and relationalalgebra - why did SQL become the industry standard?
From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: 14 Feb 2003 23:14:05 -0800
Message-ID: <e9d83568.0302142314.158f178c_at_posting.google.com>
Date: 14 Feb 2003 23:14:05 -0800
Message-ID: <e9d83568.0302142314.158f178c_at_posting.google.com>
> 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.
regards,
Lauri Pietarinen
Received on Sat Feb 15 2003 - 08:14:05 CET