On Sat, Jul 5, 2014 at 8:12 AM, Edson Richter <edsonrichter@hotmail.com> wrote:
> Thanks!
>
> I'll investigate (explain) performance for both versions.
also be advised that in most cases when you use SQL 'UNION' you really
should be using 'UNION ALL'. It's a very common mistake:
UNION: form proper set union, combine set and remove tuple duplicates
UNION ALL: append two sets
For large sets, the duplicate removal can be expensive and possibly
introduce subtle data dependent bugs in the worst case.
merlin