Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 99CBF1337B92 for ; Thu, 25 Nov 2010 01:43:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 81424-03; Thu, 25 Nov 2010 05:43:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id B71A2133740B; Thu, 25 Nov 2010 01:43:23 -0400 (AST) Received: by pwj3 with SMTP id 3so164402pwj.19 for ; Wed, 24 Nov 2010 21:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:cc :subject:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=0dq3x0xk4Un0hfRl4OQ4GGIugJMHcBLyOz0rhLosba4=; b=kXp+U54zonD5/oxHrEQkXA50YWC6x9mVh1FnEpuXCmBZzkYj/dp94UpQ6HaaEQizNJ +CNCW1LyE0l85b0oVuW5DM6P45Q057STdGEmXQMIHc0bRVOow3M565LxRIPCd0MTNdC6 9XfzygjnXDEKhpmSPeFilnMDtGc+0PbuJB3fk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:cc:subject:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=QrHbBWwxXMfVcFSuJr+eeuiYQKpmSDASNtfPVZqBEtsUIo6EibhlbVnZ+Pct7Vybyc i47GhayvthhZq1Jv+eY7MZI4jAFkTGFD5V4+qgkH/+NqxO8yfRzIFagUwozG70RJOqL6 8FQ9fK4HUnajIPg2UH78eHdd+G6Q5oRDQ1T3U= Received: by 10.142.215.15 with SMTP id n15mr262009wfg.77.1290663800952; Wed, 24 Nov 2010 21:43:20 -0800 (PST) Received: from eddie (c-67-186-249-122.hsd1.ut.comcast.net [67.186.249.122]) by mx.google.com with ESMTPS id y42sm443155wfd.22.2010.11.24.21.43.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Nov 2010 21:43:19 -0800 (PST) Message-ID: <4cedf777.2a978e0a.619c.164d@mx.google.com> Date: Wed, 24 Nov 2010 22:42:55 -0700 From: Joshua Tolley To: c k Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] plpyhton References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sgneBHv3152wZ8jf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/218 X-Sequence-Number: 36184 --sgneBHv3152wZ8jf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 24, 2010 at 11:56:16AM +0530, c k wrote: > Hello, > Does calling a pl/python function from each database connection load the > python interpreter each time? what are the effects of using pl/python > function in a environment where no. of concurrent connections are more and > each user calls a pl/python function? >=20 > Please give the details about how pl/python functions are executed. > Thanks and regards, >=20 > CPK I don't know plpython terribly well, but for most PLs, calling them once in= a session loads any interpreter they require. That interpreter remains loaded for the duration of the session. So each individual connection will load its own interpreter, once, at the time of the first function call requiring that interpreter. Most widely used languages also cache various bits of important information about the functions you run, the first time you run them in a session, to avoid needing to look up or calculate that information again wh= en you run the function next time. -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com --sgneBHv3152wZ8jf 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) iEYEARECAAYFAkzt918ACgkQRiRfCGf1UMOFvACdH2lXcrCzbOAgX803Ujvfvw0m LOUAoJykSFne3ybVsyabQKJQjlIm6iiQ =8rD2 -----END PGP SIGNATURE----- --sgneBHv3152wZ8jf--