Re: Group indices and group by query

2017-05-11 Thread Andrey Mashenkov
Have you tried to avoid MAX with GROUP_BY and use technique with self-join? Smth like that select young.*, younger.age from person as young left outer join person as younger on younger.gender = young.gender and younger.age < young.age On Thu, May 11, 2017 at 3:14 PM, Guillermo Ortiz

Re: Group indices and group by query

2017-05-11 Thread Guillermo Ortiz
I tried both to get more variety of values and index should be work better to get the max(id) than max(age), but I got the same result. Elapsed time SELECT MONTH, MAX(ID) FROM PERSONWITHINDEX GROUP BY MONTH:2621ms [SELECT __Z0.MONTH AS __C0_0, MAX(__Z0.ID) AS __C0_1 FROM

Re: Group indices and group by query

2017-05-11 Thread Andrey Mashenkov
Query use PERSONWITHINDEX_MONTH_IDX instead of index_group_month_age. Do you mean query "SELECT MONTH, MAX(*AGE*)"? On Wed, May 10, 2017 at 6:21 PM, Guillermo Ortiz wrote: > Is there any limitation like databases which if it has to read more than > x% of data it do a full

Re: Group indices and group by query

2017-05-10 Thread Guillermo Ortiz
Is there any limitation like databases which if it has to read more than x% of data it do a full scan? I tried this: Result *SELECT MONTH, MAX(ID) FROM PERSONWITHINDEX GROUP BY MONTH *

Re: Group indices and group by query

2017-05-08 Thread Andrey Mashenkov
Group indices description can be found here [1]. Please, check if you read docs for your ignite version, as configuration for ignite 1.x and 2.0 can differs. Group indices in Ignite a similar to composite or multi-column indixes in databases. Yes, it is work that way. Group index for (groupFiled,

Group indices and group by query

2017-05-05 Thread Guillermo Ortiz
If I have two single indices to query: select * table a,b where a=1 and b=2 it doesn't work pretty good and I have to create a group index, how is that possible? how does group indices work? Similar to this: select max(timestampField) from myTable group by groupField I have a index by