On 8 Apr 2015, at 10:16am, Jeff Roux <jfroux06 at gmail.com> wrote: > SELECT SUM(nbBytesDecompOut+nbBytesCompIn) as vol, portLan \ > as item FROM flows WHERE timestamp>=1383770600 AND \ > timestamp<=1384770600 AND protocol IN (17, 6) GROUP BY portLan \ > ORDER BY vol DESC LIMIT 6
If you want us to understand what's happening please run ANALYZE then give us the output of EXPLAIN QUERY PLAN <the above SELECT> Simon.