By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,696 Members | 1,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,696 IT Pros & Developers. It's quick & easy.

specifics about BIT(n) types

P: n/a
please CC me as I'm on silent or digest.
--------------------------------------------------
I know these questions have been asked, and once by me. I can't find it
in the archives or in the documentation.

1/ Are the bits in BIT(n) types stored as 1 bit per '0/1' or as one BYTE
per '0/1' ?
2/ What is the RANGE of the number of bits storable?
3/ What kind of speed comparisons are there between using BIT(n) tyeps
and using multiple columns of INT4/8 values?

For example:

SELECT bit_varying_128_A & bit_varying_128_B FROM some_table;
vs
SELECT int8_A & int8_B & int8_C & int8_C FROM some_other_table;
I sure would love to see the answers to these questions put in the
BIT(n) section of the USER MANUAL, section 5.9.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Dennis Gearon wrote:
1/ Are the bits in BIT(n) types stored as 1 bit per '0/1' or as one
BYTE per '0/1' ?
1 bit
2/ What is the RANGE of the number of bits storable?
1 to about 8*10^9 should be possible (although perhaps not thoroughly
tested by many people)
3/ What kind of speed comparisons are there between using BIT(n)
tyeps and using multiple columns of INT4/8 values?


There should not be any noticeable difference.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.