Subject | Re: [ib-support] Advice |
---|---|
Author | Luiz |
Post date | 2002-02-12T22:24:24Z |
Claudio,
11/03
12/03
15/04
18/06
....
If I use a dateonly column and creating a index on this column, it will
inadequate to use this index to locate persons doing birthdays in a period.
If I want all person doing birthdays between 11/01 and 15/04, what will be
the better option to columns saving this values and your indexes? A varchar?
two smallints, one to month and other to day?
Luiz.
> ""Luiz"" <cprmlao@...> wrote in messagein
> news:017201c1b375$f5dcfa50$010aa8c0@......
> > I need advice about which the better choice to a column to store
> birthdays,
> > so that locating rows to birthdays in a period will be fast.
>
> I don't understand well. There's only one option: the true DATE-only type
> dialect 3. This is internally a signed long integer.that
>
> Or do you need to sort do a grouping by month, whatever the year is? In
> case, you could have a trigger that populates a smallint column that keepsLet's upon the bitrthsays are(dd/mm):
> separately the month for those purposes even with the date field present.
> Don't give up that date field, as it's the easier way to calculate date
> differences and the like.
11/03
12/03
15/04
18/06
....
If I use a dateonly column and creating a index on this column, it will
inadequate to use this index to locate persons doing birthdays in a period.
If I want all person doing birthdays between 11/01 and 15/04, what will be
the better option to columns saving this values and your indexes? A varchar?
two smallints, one to month and other to day?
Luiz.