Search Postgresql Archives

multiple group by on same table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


I'm going to need to GROUP BY the same table
multiple times. That is, something like:

select (some aggregate functions here) from
tableA group by f1, f2

select (some other aggregate functions here) from
tableA group by f3, f4

etc

The table is pretty large; can someone suggest the
best way of doing it? Is running N queries at the same
time (that is, using N connections with N threads in
the client code) the only way to speed up things (so
that the "concurrent scan" thing can help)? Or it's
more likely that it won't help that much, given that
we have a fairly good storage? Just trying to get some
ideas before starting testing....

(table will be 5M rows, where some of the group by
select could return 3-400K groups)

Leonardo

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux