Subject | Re: [firebird-support] Groupby on date |
---|---|
Author | Aage Johansen |
Post date | 2004-11-09T20:46:12Z |
Chad Z. Hower wrote:
select extract(month from FIELDTIMESTAMP), ...
where FIELDTIMESTAMP between :TS1 and :TS2
...
--
Aage J.
> :: Is the table growing and growing and you still want to groupAn index (on FieldTimeStamp) might help when you add a WHERE clause:
> :: by month, not depending on what year it is?
>
> Actually yes year would be part of it.
>
> :: SELECT
> :: EXTRACT(MONTH FROM FieldTimeStamp),
>
> This was exactly my plan and how Im doing it now. But will Extract use an
> index? Also I might need to group by year and month in some cases where the
> criteria might extend beyond 12 months.
select extract(month from FIELDTIMESTAMP), ...
where FIELDTIMESTAMP between :TS1 and :TS2
...
--
Aage J.