Re: relational algrabra division?
From: James K. Lowden <jklowden_at_speakeasy.net>
Date: Sun, 14 Dec 2014 17:12:06 -0500
Message-Id: <20141214171206.bc7b2df3.jklowden_at_speakeasy.net>
Date: Sun, 14 Dec 2014 17:12:06 -0500
Message-Id: <20141214171206.bc7b2df3.jklowden_at_speakeasy.net>
On Fri, 12 Dec 2014 05:20:48 -0800 (PST)
-CELKO- <jcelko212_at_earthlink.net> wrote:
> FROM Hangar
> WHERE NOT EXISTS
> (SELECT *
> FROM PilotSkills AS PS2
> WHERE (PS1.pilot = PS2.pilot)
> AND (PS2.plane = Hangar.plane)));
...
> The use of the NOT EXISTS() predicates is for speed. Most SQL systems
> will look up a value in an index rather than scan the whole table.
> The SELECT * clause lets the query optimizer choose the column to use
> when looking for the index.
I don't want to criticize an otherwise lucid answer, but SELECT * does no such thing!
--jkl Received on Sun Dec 14 2014 - 23:12:06 CET