Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Karol Thank you for your answer. The query is a very simplified one, just for show the idea. I can create an index as the following: CREATE INDEX IDX_ASIENTOSDET1 ON ASIENTOSDET COMPUTED BY ( CAST(ASI_ANOEJE AS CHAR(5)) || CAST(ASI_CODSUC AS CHAR(5)) || CAST(EXTRACT(MONTH FROM

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, 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 regards, Karol Bieniaszewski From: mailto:firebird-support@yahoogroups.com Sent: Monday, August 24, 2015 7:28 PM To:

[firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody I had the following query: SELECT D.ASI_ANOEJE, D.ASI_CODSUC, EXTRACT(MONTH FROM C.ASC_FECHAX) AS ASI_NUMMES, D.ASI_NUMCUE, D.ASI_NUMSUB FROM ASIENTOSDET D JOIN ASIENTOSCAB C ON D.ASI_CODSUC = C.ASC_CODSUC AND D.ASI_IDECAB = C.ASC_IDENTI GROUP

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, as i say previously you can not do this as index can not be updated if something was changed in ASIENTOSCAB. And any subseclect is not recognized by plan parser as expression index def regards, Karol Bieniaszewski From: mailto:firebird-support@yahoogroups.com Sent: Monday, August 24,

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, as i say previously you can not do this as index can not be updated if something was changed in ASIENTOSCAB. And any subseclect is not recognized by plan parser as expression index def regards, Karol Bieniaszewski From: mailto:firebird-support@yahoogroups.com Sent: Monday, August 24,

Re: [firebird-support] Expression index for use with the GROUP BY clause

2015-08-24 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Ok, thank you Karol. Greetings. Walter. On Mon, Aug 24, 2015 at 2:32 PM, liviusliv...@poczta.onet.pl [firebird-support] firebird-support@yahoogroups.com wrote: Hi, as i say previously you can not do this as index can not be updated if something was changed in ASIENTOSCAB. And any