This discussion is archived
4 Replies Latest reply: Sep 4, 2013 1:14 AM by ShuklaJi RSS

Learning TT database

ShuklaJi Newbie
Currently Being Moderated

Hi All,

I'm new to this Times Ten in memory Database.

I'm analyzing scope of using it for our web application.

I've gone through DEMOs at OLL Advanced Search but still I've few questions in my mind.

1. My Oracle database has implemented VPD (Virtual private database). Does TT have VPD?

2. My Oracle database size is nearly 5 GB, which I want to keep in Times Ten Cache database. I can understand that using Cache group, I can cache set of tables in Oracle database into TT database. These tables should have a  foreign Key relationship. I've certain tables in Oracle database, those are rarely updated ( say my_customer_names, my_product_list etc) Even though there is no master detail relation ship, CAN I CACHE THESE TABLES in TT database?

3. I can understand that we provide a refresh interval while creating these Cache Group. How can I recover my data in TT database if the TT database crashes 2-3 seconds after refreshing.?

4. Do I need to manually copy each stored procedure written in pl/sql in my Oracle database to the TT database? or there is any utility available?

5. Are triggers supported in TT database?

6. If there is a performance issue in TT database, how can I identify the bottle neck and tune the same?

 

Bottom line is, I've an Oracle database for an application, having size nearly 5 GB. I want to migrate it as it is to the TT database ( because I've heard it is much more faster) so that my web applications has everything in cache, but finally it is writing the data into my original Oracle Database. What is the easiest way to achieve this.

 

Please point me to some docs for the beginners as well.

 

Many thanks

Amit

  • 1. Re: Learning TT database
    ChrisJenkins Guru
    Currently Being Moderated

    With regard to your questions:

     

    1. My Oracle database has implemented VPD (Virtual private database). Does TT have VPD?

     

    No, TimesTen does not have VPD or anything similar.

     

    2. My Oracle database size is nearly 5 GB, which I want to keep in Times Ten Cache database. I can understand that using Cache group, I can cache set of tables in Oracle database into TT database. These tables should have a  foreign Key relationship. I've certain tables in Oracle database, those are rarely updated ( say my_customer_names, my_product_list etc) Even though there is no master detail relation ship, CAN I CACHE THESE TABLES in TT database?

     

    A primary key / foreign key relationship between tables is only necessary if you want to =group the tables together into the same cache group in TimesTen. If you cache the tables in separate cache groups (in the same TimesTen cache database) then there is no need for the foreign key relationships. Each table to be cached must still have either a primary key or a unique index defined across a set of NOT NULL columns however.

     

    3. I can understand that we provide a refresh interval while creating these Cache Group. How can I recover my data in TT database if the TT database crashes 2-3 seconds after refreshing.?

     

    TimesTen is a complete database in its own right and it has its own persistence, transaction logging and recovery mechanisms completely independent of the Oracle database. These mechanisms are fully employed even when Timesten is acting as a cache. Hence all modifications to cached data are transactional, persistent and recoverable. If the TimesTen database (or the machine hosting it) were to crash immediately after a refresh then when TimesTen restarts the database will automatically be recovered back to the last committed transaction (in this case the end of the refresh).

     

    4. Do I need to manually copy each stored procedure written in pl/sql in my Oracle database to the TT database? or there is any utility available?

     

    This is currently a manual process. There is no utility for this. Also note that not all PL/SQL that can run in Oracle database can run in TimesTen. You need to asses your PL/SQL to see if it is compatible with TimesTen.

     

    5. Are triggers supported in TT database?

     

    No.

     

    6. If there is a performance issue in TT database, how can I identify the bottle neck and tune the same?

     

    That's too big a topic to simply answer here. Please consult the TimesTen documentation, white papers etc.

     

    Bottom line is, I've an Oracle database for an application, having size nearly 5 GB. I want to migrate it as it is to the TT database ( because I've heard it is much more faster) so that my web applications has everything in cache, but finally it is writing the data into my original Oracle Database. What is the easiest way to achieve this.

     

    Simply migrating the entire database to TimesTen is unlikely to be a viable or successful endeavour. For a start, if your data occupies 5 gB in oracle database it may well occupy 20 GB or more in TimesTen so you would need a machine with >> 20 GB of RAM to host this. Also, TimesTen can only speed up the database part of the processing. Have you assessed your application in detail and do you know that the database processing is the bottleneck? For some kinds of application the way in which they are written may prevent them from realising a big speedup regardless of the database technology used. That also needs to be assesed. I'm not trying to put you off but simply highlighting that migrating your database in its entirety to an in-memory database without assessing all the related factors may in fact not bring the desired improvement. There is no magic bullet that fixes all performance issues.

     

    Please point me to some docs for the beginners as well.

     

    There are quite a few step by step tutorials in the 'QuickStart' that gets installed as part of the TimesTen documentation set. Have you looked at those?

     

    Chris

  • 2. Re: Learning TT database
    ShuklaJi Newbie
    Currently Being Moderated

    Thank you so much Chris, for the response. Few more doubts are surfacing in my mind:

    1. What should be the criteria for Oracle Objects to be cached in TimesTen?

    2. I can understand that TimesTen is a different database altogether. What is the advantage of having Timesten in between Oracle Database and the Application?

    3. Can we get rid of Oracle itself, and keep entire thing in TimesTen only ( for faster response time). If so, why not every Oracle user is migrating to TimesTen?

    4. I was under an impression that in TimesTen, entire database is in RAM, there fore it is faster as compared to Oracle Database. As you mentioned in your previous answer " Simply migrating the entire database to TimesTen is unlikely to be a viable or successful endeavour.", i feel it is unwise cache entire database in TimesTen. We can Cache certain objects in Oracle as well using KEEP_BUFFER. What is the advantage of introducing TimesTen in between Oracle database and Web server for caching tables in times ten OVER  Oracle's KEEP_BUFFER?

     

    Thanks

    Amit

  • 3. Re: Learning TT database
    ChrisJenkins Guru
    Currently Being Moderated

    1. What should be the criteria for Oracle Objects to be cached in TimesTen?

     

    CJ>>   Generally one caches the tables, or table subsets, that you have determined are a data access bottleneck for your application and for which you have evaluated the benefit of caching them in TimesTen. As part of this evaluation you need to consider the differences between TimesTen and Oracle database and the impklications of moving from a single database architecture to a two database architecture (stat in two different databases maintained in synchronisation).

     

    2. I can understand that TimesTen is a different database altogether. What is the advantage of having Timesten in between Oracle Database and the Application?

     

    CJ>>   For suitable applications, where TimesTen has been properly integrated into the architecture, big improvements to performance can be realised. Also, overall application availability may be improved as well.

     

    3. Can we get rid of Oracle itself, and keep entire thing in TimesTen only ( for faster response time). If so, why not every Oracle user is migrating to TimesTen?

     

    CJ>>    In some cases this may be possible but usually it is not. TimesTen is a different database to Oracle and while it has many similarities it also has many differences. Oracle database has many features and functionalities that are not supported by TimesTen. TimesTen is able to support very large in-memory databases (multi-TB) but these require huge amounts of RAM and can be hard to manage (long startup and shutdown times). TimesTen is best suited for specific applications that require the very short consistent response times provided by TimesTen and which have been specifically developed, or modified, to work well with TimesTen.

     

    4. I was under an impression that in TimesTen, entire database is in RAM, there fore it is faster as compared to Oracle Database. As you mentioned in your previous answer " Simply migrating the entire database to TimesTen is unlikely to be a viable or successful endeavour.", i feel it is unwise cache entire database in TimesTen. We can Cache certain objects in Oracle as well using KEEP_BUFFER. What is the advantage of introducing TimesTen in between Oracle database and Web server for caching tables in times ten OVER  Oracle's KEEP_BUFFER?

     

    CJ>>   These are totally different things. The KEEP_BUFFER pool in Oracle is simply another cache area in the SGA where you can place objects that will be frequently referenced. But there is still no guarantee that these objects are always kept in memory; the pool contents can be aged out just like for any other cache pool. Even when objects are in memory this is still very different to TiemsTen because:

     

    1.    TimesTen stores and manages all data using memory optimised storage formats, indexing techniques and access algorithms. This results in it using far fewer CPU cycles to perform SQL operations compared to in-memory access of disk based data in a disk based database. This is the real performance premise of all in-memory databases; not so much the holding of the data in memory but the use of memory optimised storgae formats/structures and access algorithms.

     

    2.    TimesTen is usually deployed on the same machine as the application. hence the application can use TimesTen extremely fast and highly optimised 'direct' connection mechanism thereby avoiding any inter-process communication (or network connection) between the application and TimesTen. This greatly increases the efficiency of application/database interaction and results in major performance improvements, especially for OLTP type workloads.

     

    Chris

  • 4. Re: Learning TT database
    ShuklaJi Newbie
    Currently Being Moderated

    Thank you so much Chris!

    It really helped.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points