You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Maryam Moazeni <mm...@gmail.com> on 2006/06/01 08:17:09 UTC

storage requirement

Hi

I would like ti know the storage required for DATE, TIME and TIMESTAMP.
Please advise...

Thanks,
Maryam

Re: storage requirement

Posted by Anders Morken <an...@stud.ntnu.no>.
Maryam Moazeni:
> I would like ti know the storage required for DATE, TIME and TIMESTAMP.

Take a look in java/engine/org/apache/derby/iapi/types - as far as I can
tell that's where the SQL data types live, in SQLDate.java, SQLTime.java
and SQLTimestamp.java. The comments explain how they're stored and how
much space they require. =)

-- 
Anders Morken

My opinions may have changed, but not the fact that I am right!

Re: storage requirement

Posted by Bryan Pendleton <bp...@amberpoint.com>.
Maryam Moazeni wrote:
> I would like ti know the storage required for DATE, TIME and TIMESTAMP.

I assume you mean the disk space storage requirement for a column
of such a type?

One simple way to figure this out is to create a table containing
a column of such a type, store a few hundred thousand rows into
that table, figure out the overall size of the table, and divide
by the number of rows.

For purposes such as this, it would probably be adequate to figure
out the overall size of the table just by using your operating system
"ls" or "dir" command on the underlying *.dat file in your seg0 folder.

thanks,

bryan