Re: WHERE ... NOT NULL ... OR ... (SELECT...)

From: Mario Splivalo <mario(at)splivalo(dot)hr>
To: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: WHERE ... NOT NULL ... OR ... (SELECT...)
Date: 2015-08-24 12:13:02
Message-ID: 55DB0A4E.4030600@splivalo.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 08/24/2015 01:34 PM, Dickson S. Guedes wrote:
> 2015-08-23 18:01 GMT-03:00 Mario Splivalo <mario(at)splivalo(dot)hr>:
>> Unique (cost=193891.55..212017.84 rows=329569 width=162)
>> -> Sort (cost=193891.55..194715.47 rows=329569 width=162)
>
> I'm not answering your original question, but since the queries in your UNION
> will be mutually exclusive, you could replace your UNION by UNION ALL to rip off
> the Sort+Unique Node.
>

Good point, thank you! :)

Mario
--
Mario Splivalo
mario(at)splivalo(dot)hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Amreen Khan 2015-08-25 19:20:43 Reassign permissions
Previous Message Dickson S. Guedes 2015-08-24 11:34:12 Re: WHERE ... NOT NULL ... OR ... (SELECT...)