jump to navigation

What is Oracle TimesTen March 26, 2012

Posted by Mich Talebzadeh in Oracle TimesTen.

Oracle TimesTen (TT) is an in-memory relational database. TimesTen was designed and implemented from the ground up as an IMDB. TimesTen origins are in the SmallBase in-memory database project from Hewlett Packard labs back in the early 90s. TT was one of the first true IMDBs. It stores data using the row based relational model (tables, columns, datatypes, indexes etc.), and uses SQL as the access language. it provides many APIs (ODBC, JDBC, OCI, Pro*C) and supports Oracle’s PL/SQL. Applications work with it in the same way they would work with any other relational database. The main difference is that the performance offered by TimesTen is much better compared to a normal disk-centric relational database. Although TimesTen operates completely in memory it does keep a copy of the database on disk purely for restart and recovery purposes. This copy is kept up to date via a combination of checkpointing and transaction logging thus allowing for recovery after any sort of failure. TimesTen also has a powerful replication mechanism which is typically used for high-availability allowing one to build systems offering excellent high availability. The other main capability of TimesTen is the Cache Connect functionality which allows a TimesTen database to act as a high performance cache for a subset of data in a backend Oracle database. When used in this way it is known as the In-Memory Database Cache option to Oracle database.

So TimesTen is a standalone high performance database that can also be used to cache data from Oracle. By moving ‘hot’ data closer to the application (TT is normally installed on the application server), and enabling high performance access to that data, performance improvements can be realized and new architectures become possible. In many cases TimesTen also stores non-Oracle data which is managed in a persistent, transactional highly available manner. Although not specifically focused on Java, TimesTen provides Java support via its JDBC driver. However, TimesTen also supports access from many other languages (C, C++, Python, Perl etc.). A TimesTen cache is transparent in that you can look at the cached data using any usual relational tool.

If the application has a ‘database centric’ view of its data (i.e. it accesses its data using SQL and JDBC) then TimesTen may be the best fit though TimesTen does not have any built in interoperability to non-Oracle databases so the application code would have to manage any data movement between TimesTen and Sybase or others. Also, if the application requires database style transactional functionality, persistence and recoverability then TimesTen is an excellent choice.

TimesTen memory structure

TimesTen memory constructs are far simpler than say Oracle.  As mentioned before TimesTen does not have the concept of ‘database buffer cache’, ‘keep pool’ or ‘recycle pool’. There is no concept of LRU or MRU chain or for that matter mid point insertion.

Figure 1 shows a familiar memory structure (simplified) for Oracle database.

Figure 1: A simplified diagram of Oracle System Global Area (SGA)

Like any other DBMS Oracle is designed using a strategy of minimizing disk I/O. This design strategy stems from the recognition of I/O as a very important factor in database’s performance. In contrast, in-memory database systems eliminate disk I/O from the beginning. Their overriding optimization goal is reducing memory and CPU demands. Figure 2 shows basic component of TimesTen.

Figure 2: Basic components of TimesTen


No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: