Re: Fastest way / best practice to calculate "next birthdays"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "er(dot)tejaspatel88(at)gmail(dot)com" <er(dot)tejaspatel88(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Fastest way / best practice to calculate "next birthdays"
Date: 2015-05-21 03:22:15
Message-ID: CAKFQuwZLcWw6=T6GU9rF+6DCN6+DSOgZJg1JAgOKLWG6KEUiWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Monday, May 18, 2015, er(dot)tejaspatel88(at)gmail(dot)com <
er(dot)tejaspatel88(at)gmail(dot)com> wrote:

> If I have to find upcoming birthdays in current week and the current week
> fall into different months - how would you handle that?
>

Extract(week from timestamptz_column)

ISO weeks are not affected by month boundaries but do start on Monday.

David J.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Florian Lohoff 2015-05-21 10:41:03 union all and filter / index scan -> seq scan
Previous Message er.tejaspatel88@gmail.com 2015-05-18 09:30:15 Re: Fastest way / best practice to calculate "next birthdays"