From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Kerr <dmk(at)mr-paradox(dot)net> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: killing processes |
Date: | 2009-07-21 17:13:18 |
Message-ID: | 15449.1248196398@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David Kerr <dmk(at)mr-paradox(dot)net> writes:
> On Mon, Jul 20, 2009 at 11:14:22PM -0400, Tom Lane wrote:
> - Huh. How big an array were you trying to invoke it on?
> there are 899991 records in the table it's just
> test=# \d test2
> Table "public.test2"
> Column | Type | Modifiers
> --------+--------------+-----------
> t1 | numeric(9,4) |
I tried it on a table with 899991 random values. It took frickin'
forever, but seemed to be willing to respond to cancels anywhere
along the line. I'm not sure why you're seeing differently.
(The reason it takes forever is that numeric is a variable-width
type, and access into a varwidth array is O(n), so the sorting
step you've got here is O(n^2). It might help to use unnest()
instead of this handmade version of it ...)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-07-21 17:16:05 | Re: array_agg crash? |
Previous Message | Chris Spotts | 2009-07-21 17:09:13 | Re: array_agg crash? |