> please could you let me know which index could be better or faster? For this particular query index on (t,a,b,c) or even on (t,a,b,c,d) would be better and cause the query to execute faster (of course if by conditions t>x1 and t<x2 you don't select almost all rows in the table).
> also do you know by chance how to speed up the index creation? There's no way to do that. SQLite have to scan the whole table, read data from all rows and put necessary information into the index. Nothing in this process can be sped up. Pavel On Mon, Oct 19, 2009 at 5:50 PM, Sylvain Pointeau <sylvain.point...@gmail.com> wrote: > hello, > I have a table T (a,b,c,d,t) > where c is a value > a,b,c some dimensions > and t the time > > I need to make a subset with a "group by" > like > > select a,b,c,sum(d) > from T > where t>x1 and t<x2 > group by a,b,c > > I created an index on a,b,c > but this table is large and the index creation is time consuming (few hours) > > please could you let me know which index could be better or faster? > also do you know by chance how to speed up the index creation? > > Best regards, > Sylvain > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users