Skip site navigation (1) Skip section navigation (2)

Re: PL/pgSQL functions - text / varchar - havy performance

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: Andrew Sullivan <andrew(at)libertyrms(dot)info>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PL/pgSQL functions - text / varchar - havy performance
Date: 2003-08-29 15:34:13
Message-ID: 3F4F7275.5030203@potentialtech.com (view raw or flat)
Thread:
Lists: pgsql-performance
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


In response to

Responses

pgsql-performance by date

Next:From: Andrew SullivanDate: 2003-08-29 15:54:01
Subject: Re: PL/pgSQL functions - text / varchar - havy performance
Previous:From: Alexander PriemDate: 2003-08-29 15:13:52
Subject: Re: Indexing question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group