On Wed, Nov 30, 2016 at 8:15 AM, bto...@computer.org <bto...@broadstripe.net
> 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.

David J.

Reply via email to