Technical data

Running out of a resource
Troubleshooting TimesTen Applications and Data Stores 2-17
When the TimesTen data store fills up, it is important to determine whether it is the
permanent or the temporary segment that is filling up. Use the ttIsql dssize
command to list allocated, in-use, and high water mark sizes for the permanent and
temporary data partitions. The dssize command selects the following values from
SYS.MONITOR:
PERM_ALLOCATED_SIZE
PERM_IN_USE_SIZE
PERM_IN_USE_HIGH_WATER
TEMP_ALLOCATED_SIZE
TEMP_IN_USE_SIZE
TEMP_IN_USE_HIGH_WATER
The permanent segment consists of table and index data, while the temporary segment
consists of internal structures, such as locks, sorting areas, and compiled commands.
Keeping transactions short and making sure there is enough temporary space in the
data store prevents locks from occupying all of the remaining temporary space. You
can also use table locks if transactions are acquiring tens of thousands of row locks.
For tips on how to estimate the size of your data store, see "Size your data store
correctly" in the Oracle TimesTen In-Memory Database Operations Guide.
Permanent segment filling up
Consider whether you can drop any indexes. You may want to look at query plans to
see which indexes are actually used. See "Viewing and changing query optimizer
plans" in the Oracle TimesTen In-Memory Database Operations Guide. You can also use
the ttRedundantIndexCheck procedure to discover redundant indexes. The
procedure returns suggestions about which indexes to drop.
Use the ttSize utility to estimate the amount of memory used by each table in the
data store. If the amount of data you need to store is too big, you may need to reset the
PermSize attribute for the data store to increase the size of the permanent segment.
Alternatively, you may need to partition your data into several different data stores if,
for example, you cannot shrink the temporary segment or create a bigger data store
because of limits on the memory segment size.
Sometimes when the permanent segment fills up, copying the data out of the data
store, deleting all the data, and copying it back in frees up space. This can be done
more efficiently by using the ttMigrate utility with the -noRepUpgrade option to
migrate the data out, destroy and re-create the data store, and migrate the data back
in. This operation is described in "Reducing data store size" in the Oracle TimesTen
In-Memory Database Installation Guide.
Finally, you may have to configure the operating system to allow a larger amount of
shared memory to be allocated to a process. You may also have to allocate more swap
space for virtual memory. See "Check available swap space (virtual memory)" on
page 2-18.
Temporary segment filling up
Some commands may be allocating too much space because of out-of-date statistics.
See "Update query optimizer statistics" on page 2-18.
If updating the statistics does not reduce temporary segment memory usage,
disconnect all connections and then reconnect them. Verify that all connections have