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 88E24D1B574 for ; Fri, 29 Aug 2003 15:34:56 +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 33843-04 for ; Fri, 29 Aug 2003 12:34:45 -0300 (ADT) Received: from mta6.adelphia.net (mta6.adelphia.net [68.168.78.190]) by svr1.postgresql.org (Postfix) with ESMTP id 79DA9D1B8D2 for ; Fri, 29 Aug 2003 12:34:29 -0300 (ADT) Received: from potentialtech.com ([24.53.179.151]) by mta6.adelphia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030829153415.TCDL18217.mta6.adelphia.net@potentialtech.com>; Fri, 29 Aug 2003 11:34:15 -0400 Message-ID: <3F4F7275.5030203@potentialtech.com> Date: Fri, 29 Aug 2003 11:34:13 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Sullivan Cc: pgsql-performance@postgresql.org Subject: Re: PL/pgSQL functions - text / varchar - havy performance References: <200308291554.46748.o.siegmar@vitrado.de> <3F4F6754.8050900@potentialtech.com> <20030829150151.GI19388@libertyrms.info> In-Reply-To: <20030829150151.GI19388@libertyrms.info> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/499 X-Sequence-Number: 3315 Andrew Sullivan wrote: > On Fri, Aug 29, 2003 at 10:46:44AM -0400, Bill Moran 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. > > It does? According to the docs, varchar is just syntactic sugar for > text. In fact, text and varchar() are supposed to be exactly the > same. Really? Well, if I'm wrong, I'm wrong. Wouldn't be the first time. Have any explanation as to why that function is so slow? -- Bill Moran Potential Technologies http://www.potentialtech.com