Subject | Re: [firebird-support] First query very slow |
---|---|
Author | Josef Kokeš |
Post date | 2013-02-05T07:39:16Z |
> 1) Why do you group on something not an output field? I didn't thinkIt is. I am not sure if it has any reasonable use, but it is possible.
> that was allowed.
> 2) LEFT JOIN followed by referencing to a field in the table being NOTMaybe my queries are wrong, but my experience has been that LEFT JOIN +
> NULL makes the LEFT JOIN in reality become a (inner) JOIN, sometimes
> that's OK for optimization, but you haven't mentioned that being the
> case here.
IS NOT NULL is very often far faster than an (INNER) JOIN. These days I
just use LEFT JOIN + IS NOT NULL everywhere because the speed tends to
be good all the time, unlike JOIN (where I may get a good speed in one
query and horrible speed in another; incidentally, LEFT JOIN + IS NOT
NULL doesn't seem to be any slower than a JOIN on my queries).
Josef