Re: [PERFORM] enum for performance?

2009-06-18 Thread Merlin Moncure
On Wed, Jun 17, 2009 at 6:06 PM, Whit Armstrongarmstrong.w...@gmail.com wrote: 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

[PERFORM] enum for performance?

2009-06-17 Thread Whit Armstrong
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 -- Sent via

Re: [PERFORM] enum for performance?

2009-06-17 Thread Tom Lane
Whit Armstrong armstrong.w...@gmail.com writes: 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). Nope. enums are always 4 bytes. char(1) is going to take 2 bytes (assuming those