X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9ADA6D1B8AD for ; Fri, 29 Aug 2003 15:02:39 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 31436-02 for ; Fri, 29 Aug 2003 12:02:28 -0300 (ADT) Received: from router.intranet.de (morpheus.vitrado.de [194.97.5.114]) by svr1.postgresql.org (Postfix) with ESMTP id D3112D1B8A4 for ; Fri, 29 Aug 2003 12:02:26 -0300 (ADT) Received: from 192.168.1.50 ([192.168.1.50]) by router.intranet.de (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h7TF1RY20572; Fri, 29 Aug 2003 17:01:28 +0200 From: Oliver Siegmar Organization: Vitrado GmbH To: Bill Moran Subject: Re: PL/pgSQL functions - text / varchar - havy performance issue?! Date: Fri, 29 Aug 2003 17:01:51 +0200 User-Agent: KMail/1.5.3 References: <200308291554.46748.o.siegmar@vitrado.de> <3F4F6754.8050900@potentialtech.com> In-Reply-To: <3F4F6754.8050900@potentialtech.com> Cc: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308291701.51853.o.siegmar@vitrado.de> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/496 X-Sequence-Number: 3312 Hi Bill, On Friday 29 August 2003 16:46, you wrote: > Postgres has to convert the text to a varchar before it can actually > do anything. It's possible (though I'm not sure) that it has to > do the conversion with each record it looks at. Nope. I tested you function with the temporary varchar variable...it is as slow as the 'text-only' varayity. > Every language I know of hits performance issues when you have to > convert between types. I wouldn't _think_ that it would be that > much work converting between text and varchar, but I'm not familiar > enough with the server code to know what's actually involved. I have absolutely no idea how pgsql handles text/varchar stuff in its server code. But ~ 3 seconds for that small function is ways to slow in any case. Bye, Oliver