Re: Performance of a large array access by position (tested version 9.1.3)

From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Marc Mamin <M(dot)Mamin(at)intershop(dot)de>, Jesper Krogh <jesper(at)krogh(dot)cc>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Subject: Re: Performance of a large array access by position (tested version 9.1.3)
Date: 2012-06-28 10:22:35
Message-ID: 201206281222.45642.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> >> >>> Is that behaviour is correct?
> >>
> >> yes - access to n position means in postgresql - skip n-1 elements
> >
> > Hmmm...
> >
> > how many elements to be skipped here ?
>
> there are two independent stages:
>
> a) detoast - loading and decompression (complete array is detoasted)
> b) access
>
> if you has very large arrays, then @a is significant

There is a place to add PG_GETARG_ARRAY_P_SLICE. The code is just not done
yet.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2012-07-01 04:18:43 Re: MemSQL the "world's fastest database"?
Previous Message Merlin Moncure 2012-06-27 16:49:02 Re: Can I do better than this heapscan and sort?