Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3D2581AA5B97 for ; Thu, 28 Jun 2012 07:23:02 -0300 (ADT) Received: from moutng.kundenserver.de ([212.227.17.10]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SkBsK-0003UC-VM for pgsql-performance@postgresql.org; Thu, 28 Jun 2012 10:23:01 +0000 Received: from obelix.localnet (AToulouse-556-1-155-229.w92-162.abo.wanadoo.fr [92.162.147.229]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MGi3N-1Sg0zn1Sqn-00DWCC; Thu, 28 Jun 2012 12:22:46 +0200 From: =?utf-8?q?C=C3=A9dric_Villemain?= Reply-To: cedric@2ndquadrant.com Organization: 2ndQuadrant To: pgsql-performance@postgresql.org Subject: Re: Performance of a large array access by position (tested version 9.1.3) Date: Thu, 28 Jun 2012 12:22:35 +0200 User-Agent: KMail/1.13.7 (Linux/3.2.0-2-amd64; KDE/4.7.4; x86_64; ; ) Cc: Pavel Stehule , Marc Mamin , Jesper Krogh , Maxim Boguk References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9327981.M4pFuGVxnS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201206281222.45642.cedric@2ndquadrant.com> X-Provags-ID: V02:K0:M2EfxZy8ZhokuhBvsATuw8fc9xDv4lxA12P9II4Y59L odsudH/1bkpX7henIzWh7w4rTsg7oRtoaTmm1LjS/ekQIlHc+h x6Sp1cnEXvFZmGn86Yq0+emzVs0NtlPfvtYNNw6I2Iyt3wsp5O zD+x0dYpnNR0vcOpSy93IhmbFGxU0XY5E3fzsoIx5fboauPIBx Pcsj1mdPKLmzTW+WQ971e6mzObGvv3UmPkxxtcyqlfOa4EyF/B FKRw9ebTG/P5Dj2ODVlIZVQby2C6+BGbwdaQ49ma06+ph3pQAw wNz1xn6CxNlVDaBnCXYvv9/5zjxS7XBxUKOy4BlVdyN0ls8qZW MX/J0RiwssgPBoGWMVBtQTIBhcFEjKZwR0nc5hpp5e1GVb9rD2 i4OAj0PO/R+8Q== X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/155 X-Sequence-Number: 47181 --nextPart9327981.M4pFuGVxnS Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > >> >>> Is that behaviour is correct? > >>=20 > >> yes - access to n position means in postgresql - skip n-1 elements > >=20 > > Hmmm... > >=20 > > how many elements to be skipped here ? >=20 > there are two independent stages: >=20 > a) detoast - loading and decompression (complete array is detoasted) > b) access >=20 > 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= =20 yet.=20 =2D-=20 C=C3=A9dric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - D=C3=A9veloppement, Expertise et Formation --nextPart9327981.M4pFuGVxnS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJP7DBrAAoJENsgH0yzVBebUzsH/0gERMqG+51mTBnfq89QLrfg c7ochR+K2CcYsFFDjqaJIo9sdABRcNma0uNGsu2TWui+hbJFdtOtqqM29YHefRzE dMfPaNueVdomp55dhkvtThq5NNNbH2o3A4mwBnjQplCLbI3z5Pt8zUgg+MewFmoW WZSM2AC4GngjNuWY4TPphkZ85gFa983gVm+biEHuH0UKVi/tgYuqXZVBxrxNZEIu 9tZ4Ke+ZD0RAVTqnYgp5Hbvc6X5sTSMXfSyGi1jCAlRZM5DnN9GQv4oTp61nJAG+ jRPpHnmfh2io8fqUHa5P5rM0BvKJQ/XJ+48ceMMKuEqKuzcPycJjjWX2mND5BRA= =Da2N -----END PGP SIGNATURE----- --nextPart9327981.M4pFuGVxnS--