Re: Repetitive code - Mailing list pgsql-sql

From Greg Stark
Subject Re: Repetitive code
Date
Msg-id 87lkrx6qli.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Repetitive code  ("Aaron Bono" <postgresql@aranya.com>)
List pgsql-sql
"Aaron Bono" <postgresql@aranya.com> writes:

> I haven't stared at your query as long as you have so I may have missed
> something

Likewise I'm perhaps speaking too quickly, but at the risk of making a fool of
myself: you should perhaps realize that UNION has to do a fair amount of work
to eliminate duplicates. If you know the rows are going to be distinct or if
you don't care about duplicates you can save a lot of time by using UNION ALL
instead.

-- 
greg



pgsql-sql by date:

Previous
From: Joe
Date:
Subject: Re: Repetitive code
Next
From: PFC
Date:
Subject: Re: sessions and prepared statements