Need help optimizing a query

2002-02-13 Thread david
I need to optimize the following query: SELECT user, sum(in), sum(out) FROM stats WHERE from>='20020205' AND to<='20020206' GROUP BY user; In,out are bigint, user is varcher(20) and from,to are timestamp And I want to speed up this type of query, but I have not been able to to get it to use an

Need help optimizing a query

2002-02-07 Thread david
I need to optimize the following query: SELECT user, sum(in), sum(out) FROM stats WHERE from>='20020205' AND to<='20020206' GROUP BY user; In,out are bigint, user is varcher(20) and from,to are timestamp And I want to speed up this type of query, but I have not been able to to get it to use an