Subject | Re: Master-Detail query help, please... :) |
---|---|
Author | Greg At ACD |
Post date | 2005-09-29T16:43:41Z |
--- In firebird-support@yahoogroups.com, hobbit <hobbit@l...> wrote:
The problem with SELECT distinct(M.*) is that it is very slow since
all columns in M will be considered when evaluating distinctness (is
that even a word??).
If I could do
SELECT distinct(M.MID), M.*
then we might be OK, but DISTINCT always works on the full set of
data...
Greg
>Thx, Gary!
> SELECT distinct(M.*)
> FROM TableChild C
> JOIN TableMaster M ON M.MID = C.MID
> WHERE C.SomeValue IN (A, B)
>
> HTH
> Gary
The problem with SELECT distinct(M.*) is that it is very slow since
all columns in M will be considered when evaluating distinctness (is
that even a word??).
If I could do
SELECT distinct(M.MID), M.*
then we might be OK, but DISTINCT always works on the full set of
data...
Greg