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

Re: [HACKERS] varchar() vs char16 performance

From: t-ishii(at)sra(dot)co(dot)jp
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] varchar() vs char16 performance
Date: 1998-03-16 06:20:36
Message-ID: 199803160620.PAA03951@srapc451.sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
>I ran some timing tests to check the performance of varchar() vs char16.
>The results of the test indicate that there is no difference in
>performance (within the timing scatter of the tests):
>
>char16	vc(16)
> 0.99s	 1.05s	1 row (this measures startup time, not types)
>39.29s	39.28s	~65000 rows
>
>The char2,4,8,16 types seem to have no value-added over the
>better-supported char(), varchar(), text types; I am considering
>removing them from the backend, and instead have the parser
>transparently translate the types into varchar() (or char() - I'm not
>certain which is a better match for the types) for v6.4. Applications
>would not have to be changed.
>
>Comments?

Please do not remove char2! Some users uses it for making an array of
char.

create table c(c char2[]);

Seems strange? Yes. Actually what he wanted to do was:

test=> create table c(c char[]);
ERROR:  parser: parse error at or near "["
--
Tatsuo Ishii
t-ishii(at)sra(dot)co(dot)jp

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-03-16 06:24:06
Subject: Re: [HACKERS] varchar() vs char16 performance
Previous:From: Thomas G. LockhartDate: 1998-03-16 06:04:11
Subject: Re: [HACKERS] Small changes for the "no excuses" release

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