Skip to Main Content
  • Questions
  • Questions about Oracle TimesTen cache Oracle DB data under Java application

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Joe.

Asked: January 09, 2017 - 7:59 am UTC

Last updated: October 13, 2017 - 3:38 am UTC

Version: TimesTen 11.2.2

Viewed 1000+ times

You Asked

Hi Team:
One of our customer wanna construct a db system which includs both OLTP and OLAP architecture(like SAP HANA) to gurantee the speed of historical data searching and everyday transactional processing.
As Jim Gray said "Tape is Dead, Disk is Tape, Flash is Disk, RAM Locality is King", we are considering using IMDB to satisfy our customer's request.
I like Oracle and believe that Oracle could archieve this best in Oracle-way! Maybe Oracle TimesTen is a good choice to cache Oracle DB. However, I am a novice at TimesTen, I was totally confused about the feasibility of this choice.
Here's my doubts:
1、I know we could just cache part of the tables in TimesTen Memory, and leave all the reset tables in Oracle DB (buffer or disk) in traditioal way, but I dont know how to archieve this in JAVA. I mean, how could Java Application knows the data is in TT or DB? It would be of great help if there's a JAVA Demo.
2、What if there's a TABLE JOIN query (say table A is cached in TT while table B is stored in DB), the TT memo cache will not take effect for the TABLE JOIN query, will it?
3、Any other suggestion or advice?

I've google a lot, but did not resolve my confusions, and I decide to turn to you for help, wish you could help us again.
Any help is appreciated!

and we said...

With the Oracle Database, the easiest way to run both transaction processing and analytics on the same dataset, at the same time, is to take advantage of Oracle Database In-Memory.

Oracle Database In-Memory was introduced in Oracle Database 12c Release 1 and it enables data to be populated into memory both in a row format (the buffer cache) and a new in-memory optimized columnar format, simultaneously. The Oracle Optimizer is fully aware of what data exists in the columnar format and automatically routes analytic queries to the columnar format and OLTP operations to the row format. The database maintains full transactional consistency between the row and columnar formats, just as it maintains consistency between tables and indexes.

Not all of the data necessary for the workload needs to be in the In-Memory columnar format. It is possible to join tables in the columnar format with tables in the row format.

No application changes are required either, as the database automatically retrieves the necessary data for the query from whichever format is best suited.

There remains a single copy of the data on storage (in a row format), so the footprint of the database will not increase when you use Database In-Memory.

More information on Oracle Database In-Memory can be found in the following white paper

http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory-2245633.html


Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Joe Huang, January 11, 2017 - 1:26 am UTC

Thanks for your help, Maria
Two more questions.
1) Since the introduced of DBIM, in what kind of scenarioes shall I choose TimesTen rather than DBIM? I guess DBIM is not a strategy to replace TimesTen totally, it would be nice if you could give us some tips (or conclusions maybe) about the choise of TT or DBIM.
2) I was told that the 12c in-memo is optimized in Oracle 12c RELEASE 2(which release is available in Oracle Cloud), and I wonder when '12c R2 EE' will be published officially?
Connor McDonald
January 11, 2017 - 6:16 am UTC

1) TimesTen might be something you would opt for at the app server level to implement (say) sensor level control recording, eg, millions of rows per second, or similar from a lookup perspective, ie, app server tier caching. Ultimately it will be giving memory-speed *row* based access to data.

In-memory is taking that data and reformatting it into a columnar format - so aggregation, "slicing/dicing" and analytics are far more efficient.

A vast generalisation could be: Millions/billions of small scale operations = TimeSten, Large scale operations on millions/billions of rows = In-Memory

2) 12.1.0.2 is where in-memory is released, and thousands of customers are using it with success *today*. 12.2 has *additional* in-memory features. I dont know official release dates...my *guess* would be sometime soon, but that is strictly a guess.

Joe Huang, January 11, 2017 - 9:17 am UTC


Coherence role play?

AR, October 11, 2017 - 6:02 pm UTC

Hi, if TimesTen does app tier caching, then can you please explain what does Coherence does?

I thought even that was purpose built for app tier caching and it stores in memory in key/value pairs.

Please clarify.

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.