sql - Is there a faster alternative to "group by" aggregation in Netezza? -


this minimal query statement want execute.

    select count(*) temper_300_1 group onegid; 

i have "where" clauses go along though. trying build histogram query , determine number of elements particular "onegid". query takes 7 seconds on 800 million rows. suggest faster alternative or optimization.

i trying plot heatmap spatial data consisting of latitudes , longitudes, have assigned grid id each elements, "group aggregation" coming out pretty costly in terms of time.

you're not going faster group by, though current query won't display group item associated each count.

make sure table distributed with

select datasliceid, count(1) temper_300_1 group onegid; 

the counts should equal. if they're not, dba needs redistribute table on better distribution key.

if is, ask dba create materialized view on specific column, ordered column. may see performance gains.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -