Search Postgresql Archives

Re: Re : Re : Query "top 10 and others"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 5, 2014 at 8:12 AM, Edson Richter <edsonrichter@xxxxxxxxxxx> 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux