PostgreSQL - Set Operations and Advanced Queries
Why does
UNION remove duplicates internally, and how does this affect performance compared to UNION ALL?