Search Postgresql Archives

Re: Best way to construct PostgreSQL ArrayType (_int4) from C int array

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

 



On Wed, Apr 27, 2011 at 12:00 PM, Adrian Schreyer <ams214@xxxxxxxxx> wrote:
> The largest arrays I expect at the moment are more or less sparse
> vectors of around 4.8k elements and I have noticed that the
> input/output (C/C++ extension) does not scale well with the number of
> elements in the array.
>
> Using a function that sums all elements in the array, this is the time
> it takes for ~150k arrays of various sizes (including ordering desc
> and limit 10):
>
> 128: 61ms
> 256: 80ms
> 512: 681ms
> 1024 1065ms
> 2048 7682ms
> 4096 21332ms

hm, I'm not following you exactly -- what sql are you running?  This
scales pretty well for me:
select array_dims(array(select generate_series(1,1000000)));
etc

merlin

-- 
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