(1) I create a oracle 11g2 instance, and a user dev and its tablespace
dev's tablespace size: 576,724,992 (about 476,800 records in main tables)
(2) then create a timesten instance to cache dev's tables
timesten data store file size: 1783951360
timesten perm memory size: 1723348 KB (PERM_IN_USE_SIZE of sys.monitor ):
(1) why on earth timesten triple the data size for the very same data
(2) how can I evaluate timesten perm size for the very same data from oracle, simply triple?
This is fairly typical. Oracle database's disk based storage formats are optimised for minimum space. TimesTen's in-memory storage formats are optimised for maximum performance. Many things that are variable length in Oracle are fixed length in TimesTen. It is unreasonable to expect them to use the same space.
Use the TimesTen ttSize utility to estimate the memory needed for a specific table and indexes in TimesTen.
It depends... Variable length types (VARCHAR2/NVARCHAR2/VARBINARY) may be stored INLINE or NOT INLINE. If stored INLINE then they always occupy the maximum declared size. This is not good from a storage perspective but is very good from a performance and scalability perspective. If they are stored NOT INLINE then they occupy a fixed overhead plus the actual size of data stored. NOT INLINE are better for space usage efficiency if the values are typically reasonably large but for small values the overheads are quite high. By default columns declared with a size <= 128 bytes are stored INLINE and anything declared as larger is stored NOT INLINE but there is explicit syntax to control this on a per column basis. See the TimesTen SQL Reference for more details.