|Subject||Re: [firebird-support] Expression index for use with the GROUP BY clause|
No – you can not create single index on more then one table
But you really need it?
How big is resultset? I do not see any filter in this query no HAVING nor WHERE
I had the following query:
EXTRACT(MONTH FROM C.ASC_FECHAX) AS ASI_NUMMES,
ON D.ASI_CODSUC = C.ASC_CODSUC AND
D.ASI_IDECAB = C.ASC_IDENTI
EXTRACT(MONTH FROM C.ASC_FECHAX),
Is it possible to have an expression index for use here with the GROUP BY clause?
The PLAN is the following:
PLAN SORT (JOIN (D NATURAL, C INDEX (PK_ASIENTOSCAB)))
As you can see there is a SORT there caused by the GROUP BY clause.
ASI_ANOEJE is SMALLINT
ASI_CODSUC is SMALLINT
ASC_FECHAX is DATE
ASI_NUMCUE is VARCHAR(16)
ASI_NUMSUB is CHAR(5)
I'm using Firebird 2.5.4