Subject Re: [firebird-support] splitted dates
Author Helen Borrie
At 01:54 PM 19/10/2004 +0100, you wrote:

>Hi
>
>I have been using splitted dates for improving the performance in group
>bys.
>Is it a good practice?
>The only problem is that I have three extra fields and a trigger to
>maintain my data.
>
>ex:
>
>mydate date,
>myyear integer,
>mymonth integer,
>myday integer
>
>So in the selects I can have better use of my table information.

There's no harm in it. As to "good practice", if it helps your database to
respond faster to actual application requirements, then it's good
practice. Don't be tempted to put an index on myyear, though, if most of
the dates are in a very small range of years....it's also good practice to
test little workarounds like this with typical data volumes and a timer to
see whether it turns out to be a benefit or a cost.


./heLen