Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> efficient (in size) integer datatype?

efficient (in size) integer datatype?

From: Paul Wagner <wagner_at_cs.umn.edu>
Date: 19 Jan 1999 17:53:54 GMT
Message-ID: <782gri$cof$1@news1.tc.umn.edu>


What would be the most efficient (in terms of minimizing storage space) of using INTEGER, SMALL_INT, NUMBER(3), BINARY_INTEGER, or NATURAL for a variable which can have values in the 0 to 255 range?

I would have thought SMALL_INT, but a table in the Oracle PL/SQL Programming book by Steven Feuerstein/O'Reilly says that SMALL_INT is stored internally as NUMBER(38) (same as INT or INTEGER), which makes me wonder if the # of bytes to store a SMALL_INT is actually quite large (to handle the max. of 38 digits of precision).

Thanks for any insights!

Paul

--
* * * * * * * * * * * * * * * *

Received on Tue Jan 19 1999 - 11:53:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US