Subject Re: [firebird-support] Groupby on date
Author Arno Brinkman

> :: Is the table growing and growing and you still want to group
> :: by month, not depending on what year it is?
> Actually yes year would be part of it.
> :: 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
> criteria might extend beyond 12 months.

No, EXTRACT will never use a index. Only direct field comparisons can use a
index, but as i said in my previous message a index on a month column will
not be that effective, unless you'll use that in the WHERE clause. The best
is a index on FieldTimeStamp and use that field in the WHERE clause.

Arno Brinkman

Firebird open source database (based on IB-OE) with many SQL-99 features :

Support list for Interbase and Firebird users :

Nederlandse firebird nieuwsgroep :