[thelist] Joins across UNION statements
Matt Warden
mwarden at gmail.com
Tue Oct 7 12:21:37 CDT 2008
On Tue, Oct 7, 2008 at 12:31 PM, Bill Moseley <moseley at hank.org> wrote:
> Poking around the Internet you can find recommendations against using
> UNIONS for performance reasons and suggestions to use a join, instead.
Did YOU experience any performance issues? It's the definition of a
view we are talking about here. If there are two ways to return the
same result, then you can easily change the method if it turns out you
need a performance boost. Until then, I wouldn't waste my time.
> But, I'm being thick today and not seeing how to accomplish that with
> a join instead.
What you are trying to do is a UNION. You should write it as a UNION
unless you come across a very good reason not to.
I would suggest using "UNION ALL" unless you care about duplicate
settings shared by account and user and want them de-duplicated.
--
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
More information about the thelist
mailing list