Skip site navigation (1) Skip section navigation (2)

Re: Nested query performance issue

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Віталій Тимчишин <tivv00(at)gmail(dot)com>
Cc: Glenn Maynard <glennfmaynard(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Nested query performance issue
Date: 2009-04-14 13:46:28
Message-ID: b42b73150904140646o2632f0eeu379cd1653afae9f3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
2009/4/9 Віталій Тимчишин <tivv00(at)gmail(dot)com>:
> OK, got to my postgres. Here you are:
>
> create or replace function explode_array(in_array anyarray) returns setof
> anyelement as
> $$
>     select ($1)[s] from generate_series(1,array_upper($1, 1)) as s;
> $$
> language sql immutable;
>

in 8.4, this will be replaced by the built in 'unnest'.  Also we have array_agg.

merlin

In response to

pgsql-performance by date

Next:From: Stephen FrostDate: 2009-04-14 15:56:14
Subject: Re: INSERT times - same storage space but more fields ->much slower inserts
Previous:From: Nikolas EverettDate: 2009-04-14 12:56:01
Subject: Re: difficulties with time based queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group