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

Re: 1 char in the world

From: Justin Clift <justin(at)postgresql(dot)org>
To: Matt Mello <alien(at)spaceship(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: 1 char in the world
Date: 2003-01-29 10:20:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Matt Mello wrote:
> This naturally led me to another question.  How do TEXT, "char", and 
> BOOLEAN compare for storing t/f values.  The test results I saw were 
> surprising.
> Test query=
>  "char"/TEXT: explain analyze select count(*) from table where bool='Y';
>  boolean:    explain analyze select count(*) from table where bool=true;
> Table size (see above)
> Performance averages:
>  TEXT    24ms
>  BOOLEAN 28ms
> "char"   17ms

Hi Matt,

This is interesting.  As a thought, would you be ok to run the same test 
using int4 and int8 as well?

That would probably round out the test nicely.


Regards and best wishes,

Justin Clift

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

pgsql-performance by date

Next:From: Hannu KrosingDate: 2003-01-29 12:18:20
Subject: Re: 1 char in the world
Previous:From: Andras KadingerDate: 2003-01-29 07:52:08
Subject: Re: Query plan and Inheritance. Weird behavior

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