Re: 1 char in the world - Mailing list pgsql-performance

From Justin Clift
Subject Re: 1 char in the world
Date
Msg-id 3E37AAD0.8010606@postgresql.org
Whole thread Raw
In response to 1 char in the world  (Matt Mello <alien@spaceship.com>)
List pgsql-performance
Matt Mello wrote:
<snip>
> 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


pgsql-performance by date:

Previous
From: Andras Kadinger
Date:
Subject: Re: Query plan and Inheritance. Weird behavior
Next
From: Hannu Krosing
Date:
Subject: Re: 1 char in the world