enum for performance?

From: Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: enum for performance?
Date: 2009-06-17 22:06:06
Message-ID: 8ec76080906171506ia7ba3ceo1320d4c6430cac67@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I have a column which only has six states or values.

Is there a size advantage to using an enum for this data type?
Currently I have it defined as a character(1).

This table has about 600 million rows, so it could wind up making a
difference in total size.

Thanks,
Whit

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-06-17 22:12:08 Re: enum for performance?
Previous Message Bryce Ewing 2009-06-17 21:44:20 Re: Index Scan taking long time