Re: Efficient Boolean Storage - Mailing list pgsql-general

From Richard Huxton
Subject Re: Efficient Boolean Storage
Date
Msg-id 200212041511.09660.dev@archonet.com
Whole thread Raw
In response to Efficient Boolean Storage  ("Chris White" <cwhite@at-sd.com>)
Responses Re: Efficient Boolean Storage
List pgsql-general
On Wednesday 04 Dec 2002 1:06 am, Chris White wrote:
> Hello,
>
> I need to store many (e.g. 30) booleans and am wondering what is the
> most efficient way to store them.  I can think of four options.
>
> Option 1...Use 'bool' data type
> No good since each value will require 1 byte rather than 1 bit.

Depends what you're going to use them for. Are these 30 flags that should be
grouped together? Will the users/app want all together or one at a time? Will
they feature in WHERE clauses?

--
  Richard Huxton

pgsql-general by date:

Previous
From: Matthew Gabeler-Lee
Date:
Subject: Re: 7.3 no longer using indexes for LIKE queries
Next
From: "annachau"
Date:
Subject: User date_trunc function in plpgsql function