db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Klebanoff <klebanoff-de...@sbcglobal.net>
Subject Re: Questions about "getApproximateLengthInBytes()"
Date Mon, 28 Mar 2005 16:42:25 GMT
Army wrote:

> RPost wrote:
>
>> I also noticed that the 'estimated MemoryUsage() method in
>> DataTypeDescriptor.java has similar, but in some cases different, 
>> numbers.
>
>
> Thanks for the reply--and so the plot thickens.  I did notice that 
> values for date/time/timestamp are all 12 in the estimateMemoryUsage 
> method, and that the phrase "I think" shows up once while "Who knows?" 
> shows up three times, which makes me wonder about the accuracy there.  
> On the other hand, the method "getApproximateLengthInBytes()" has the 
> word "approximate" in it, which isn't exactly confidence-boosting, 
> either.  And since "getMaximumWidth()" (which is what is currently 
> used for metadata LENGTH) isn't correct either, one is forced to 
> wonder if metadata shouldn't perhaps be doing it's own thing entirely...?
>
> Hmmm,
> Army
>
>
The DataTypeDescriptor.estimated MemoryUsage() method estimates the 
amount of RAM used by the data value. It is supposed to include of Java 
object overhead and the space taken by pointers (references). It is 
likely to be different than the amount of disk space used by the data value.

I am not sure whether DatabaseMetaData.getProcedureColumns() is supposed 
to return the size on disk or the RAM size of the column. I would guess 
that it is supposed to return the size on disk.

Jack

Mime
View raw message