Re: datatype storage questions

From: Bob Swisshelm <swisshelm_at_lilly.com>
Date: 1995/05/24
Message-ID: <1995May24.094133.4949_at_inet.d48.lilly.com>#1/1


Subject: datatype storage questions
From: Mark Vantzelfde, markv_at_news.an.hp.com Date: 23 May 1995 13:24:06 GMT
In article <3psnlm$3ip_at_hpaneqb4.an.hp.com> Mark Vantzelfde, markv_at_news.an.hp.com writes:
>1. Can someone confirm that 7 bytes is the amount of storage for
> the date datatype? Is there a way to look in the database to
> get some firsthand confirmation?
>
>2. What does the value from select avg(lengthb(col)), where col
> is of type numeric or date, reveal? Is the value returned
> the avg storage in bytes or the average display length or
> something altogether meaningless?

You want to be using the vsize function, not the lengthb function. The vsize function returns the number of bytes in the internal oracle representation of the field.

If you use vsize on a date field, you will find that it is indeed 7 bytes long.

        select distinct(vsize(created)) from dba_users;

Bob Swisshelm | swisshelm_at_Lilly.com | 317 276 5472 Eli Lilly and Company | Lilly Corporate Center | Indianapolis, IN 46285 Received on Wed May 24 1995 - 00:00:00 CEST

Original text of this message