Search Postgresql Archives

Re: select function alias

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

 



On Wed, Nov 30, 2016 at 12:15 PM, David G. Johnston
<david.g.johnston@xxxxxxxxx> wrote:
> On Wed, Nov 30, 2016 at 8:15 AM, btober@xxxxxxxxxxxx
> <btober@xxxxxxxxxxxxxxx> wrote:
>>
>> 5. Use a CTE:
>>
>>     with shortnames as (
>>         select to_char(impressions_create_date,'yyyy-mm-dd') as ymd from
>> impressionsdb
>> ) select ymd from shortnames where ymd like '2016-11%';
>>
>
> Except that WHERE clause won't get pushed down (I think...haven't checked an
> explain recently) so a sub-select is definitely better in this scenario.

It's still the case FWICT.  I suspect CTE optimization fencing is
mostly considered a feature, not a bug.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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