Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 10EC96325EF for ; Wed, 26 May 2010 13:47:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 55170-08 for ; Wed, 26 May 2010 16:47:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id A64FE632266 for ; Wed, 26 May 2010 13:47:17 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id CD98B229B9; Wed, 26 May 2010 12:47:16 -0400 (EDT) Date: Wed, 26 May 2010 12:47:16 -0400 From: Stephen Frost To: Eliot Gable Cc: pgsql-performance@postgresql.org Subject: Re: PostgreSQL Function Language Performance: C vs PL/PGSQL Message-ID: <20100526164716.GC21875@tamriel.snowman.net> References: <20100526161839.GA21875@tamriel.snowman.net> <20100526163251.GB21875@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qtrhnAqmk9hlqfP7" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 12:45:07 up 272 days, 4:10, 46 users, load average: 0.21, 0.19, 0.16 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/205 X-Sequence-Number: 38789 --qtrhnAqmk9hlqfP7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Eliot Gable (egable+pgsql-performance@gmail.com) wrote: > Since PostgreSQL is written in C, I assume there is no > such additional overhead. I assume that the PL/PGSQL implementation at its > heart also uses SPI to perform those executions. Is that a fair statement? Right, but I also wouldn't expect a huge improvment either, unless you're calling these queries a ton, or the queries that you're calling =66rom the pl/pgsql are pretty short-lived. Don't get me wrong, C is going to be faster, but it depends on exactly what's going on as to if it's going to be an overall improvment of, say, 10%, or a 10-fold improvment. :) Thanks, Stephen --qtrhnAqmk9hlqfP7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkv9UJQACgkQrzgMPqB3kigOIwCfeQEO2hE/niO1W148scXzlyYS TuMAoIYE5mYDa/6DMN/gipKJPNNFdRDS =+Fvh -----END PGP SIGNATURE----- --qtrhnAqmk9hlqfP7--