array_agg(col1 order by col2) is failing for huge amount of data

From: Anand Verma <anand07verma(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: array_agg(col1 order by col2) is failing for huge amount of data
Date: 2013-06-19 12:38:46
Message-ID: CAF-n29OumofbEqZuwcWnfbnSvCR643hT7YTNh40uyzqho4Kn7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello there...

array_agg(col1 order by col2) is failing for huge amount of data

Some of the observation is as follows-------------

the data array for timestamp is not comming in sorted order while executing
the following query

SELECT host, service, resourcetype, metrictype, array_agg(metricvalue
order by timestamp1) AS metricvalue, array_agg(sla order by timestamp1) as
slavalues, array_agg(timestamp1) as timestamp from servicemetrics where
timestamp1 between 1339046856 and 1370582856 and metricvalue is not null
and resourceType='server' GROUP BY host, resourcetype, service, metrictype

host | service | resourcetype | metrictype
|
metricvalue
|
slavalues
|
timestamp

--------------+------------+--------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
192.168.1.46 | merit_mail | server | auxfan |
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
{25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25}
|
{1370237078,1370247349,1370237103,1370247385,1370237108,1370247366,1370237112,1370247380,1370237137,1370247340,1370237122,1370247344,1370237141,1370247404,1370237160,1370247409,1370237151,1370247399,1370237146,1370247394,1370237156,1370247390,1370237175,1370247428,1370237184,1370247353,1370237180,1370247361,1370237189,1370247433,1370237194,1370247423,1370237198,1370247440,1370237203,1370247445,1370237073,1370247450,1370237069,1370247464,1370237064,1370247469,1370237059,1370247473,1370237054,1370247478,1370237222,1370247483,1370237218,1370247487,1370237098,1370247492,1370237093,1370247506,1370237117,1370247511,1370236847,1370247516,1370236853,1370247520,1370236862,1370247535,1370236858,1370247539,1370236867,1370247544,1370236872,1370247561,1370236876,1370247549,1370236881,1370247553,1370236886,1370247565,1370236890,1370247580,1370236905,1370247585,1370236910,1370247591,1370236915,1370236920,1370236925,1370236930,1370236935,1370236940,1370236945,1370236949,1370236954,1370236969,1370236974,1370236979,1370237015,1370236985,1370237005,1370236990,1370237010,1370237020,1370237049,1370237025,1370237030}

--
Anand Kumar Verma

Browse pgsql-bugs by date

  From Date Subject
Next Message lukina 2013-06-20 07:18:05 BUG #8241: submisson
Previous Message Andres Freund 2013-06-19 07:37:32 Re: BUG #8237: CASE Expression - Order of expression processing