This discussion is archived
7 Replies Latest reply: Sep 16, 2012 11:46 PM by 936666 RSS

TimesTen Replication with Oracle and Remove the Replicated data

936666 Newbie
Currently Being Moderated
Hi,
I am using 32 bit TimesTen database so the data population is max 150k records so can i replicate the data from TimesTen database to Oracle database and clean(flush the data) in TimesTen so that i can ensure that i can insert more data via TimesTen database.
Is there a way to flush the data as soon as it is replicated to Oracle database, it can be removed in TimesTen so that more data can be inserted.Any time interval can we specify to flush the data in between inserting the data say cut off 10k records,if 10k records are inserted to TimesTen and is been replicated can we remove the data in TimesTen.


Thanks!
  • 1. Re: TimesTen Replication with Oracle and Remove the Replicated data
    ChrisJenkins Guru
    Currently Being Moderated
    I'm assuming that you are talking about AWT cache groups? If so then TimesTen has an 'aging' mechanism which may work for you but it is fairly 'lazy' (to avoid excessive overhead). If you require more aggressive removal of data then you should implement an additional process or thread in your application which executes 'ULOAD CACHE GROUP WHERE ...' statements to purge a few rows (max couple of hundred) at a time. Note that data cannot be purged in this way until any pending changes have been propagated to Oracle (the UNLOAD will block until that condition is met) hence the recommendation to do this in a separate thread to the main transaction(s).

    Chris
  • 2. Re: TimesTen Replication with Oracle and Remove the Replicated data
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi 933663,
    I am using 32 bit TimesTen database so the data population is max 150k records so can i replicate the data from TimesTen database to Oracle database and clean(flush the data) in TimesTen so that i can ensure that i can insert more data via TimesTen database.
    What is the task you are trying to resolve? If you need to insert a lot of data in Oracle DB why do you use TimesTen for that? You can insert data in Oracle directly instead of using TimesTen.

    Regards,
    Gennady
  • 3. Re: TimesTen Replication with Oracle and Remove the Replicated data
    936666 Newbie
    Currently Being Moderated
    What is the task you are trying to resolve? If you need to insert a lot of data in Oracle DB why do you use TimesTen for that? You can insert data in Oracle directly instead of using TimesTen.
    I expect this question from some one else in the Forum.
    The thing is that i need to Insert Millions of data in a single go with less time,I tried with Oracle and TimesTen ,TimesTen is bit faster than Oracle for Inserting the data and where as the replication time and insertion time from TimesTen to Oracle(with replication time) is little bit less when compared to direct oracle insertion.
  • 4. Re: TimesTen Replication with Oracle and Remove the Replicated data
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi 933663,

    Thank you for your response.
    The thing is that i need to Insert Millions of data in a single go with less time,I tried with Oracle and TimesTen ,TimesTen is bit faster than Oracle for Inserting the data and where as the replication time and insertion time from TimesTen to Oracle(with replication time) is little bit less when compared to direct oracle insertion.
    I am sorry, but I don't believe you. Lets compare.

    1. If you insert data direct in Oracle DB you can use the following options:
    - Parallel query (currently TimesTen doesn't support this feature). This feature can significantly improve the performance.
    - Direct load (Append hint, SQL*LOader and etc.). You can also can significantly improve the performance.

    2. If you insert data in Oracle DB using TimesTen:
    Of course, If you insert data into TimesTen it will be very fast, but in this case you can insert only 150k records then you need to do the following:
    - moving data from TimesTen to Oracle DB
    - flush TimesTen
    - start with begin
    (you should repeat this cycle a lot of times for loading millions data)

    Obviously, the second option would be slower then the first one.


    Best regards,
    Gennady
  • 5. Re: TimesTen Replication with Oracle and Remove the Replicated data
    936666 Newbie
    Currently Being Moderated
    My project does not deals with Parallel query as of now.
    I have checked with the replication option from TimesTen to Oracle i am gaining 60 sec for 100 records.If you did not believe please come back with the figure which you have got.

    Thanks!
  • 6. Re: TimesTen Replication with Oracle and Remove the Replicated data
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi 933663,
    My project does not deals with Parallel query as of now
    Why don't you use that? What is the aim of your project?
    I have checked with the replication option from TimesTen to Oracle i am gaining 60 sec for 100 records.
    60 sec. for inserting 100 records? I think there is a problem with Oracle db server.
    If you did not believe please come back with the figure which you have got.
    Absolutely agree. Test (I use very old desktop and Vmware virtual machine):
    SQL> set timing on
    SQL> create table test_table as select * from dba_source;
    
    Table created.
    
    Elapsed: 00:00:11.27
    SQL> select count(*) from  test_table;
    
      COUNT(*)
    ----------
        632797
    
    Elapsed: 00:00:00.29
    SQL>
    11 sec for insert 632797 records. I didn't use parallelism and direct load (Append).

    Regards,
    Gennady
  • 7. Re: TimesTen Replication with Oracle and Remove the Replicated data
    936666 Newbie
    Currently Being Moderated
    You have used direct insert method where as in real time it won't be helpful since we are not really depended on direct method.direct methods are used only when we need to have a backup copy of the existing data and not for the real time data as per you example.
    I have used .net as the interface to insert the data to database for both Oracle and TimesTen and not the direct method as you have used.
    sorry it is 100k records and not 100 records for 60 sec.

    Thanks!

Legend

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