My Oracle Support Banner

How to workaround TimesTen cache groups where the child tables how no parent rows? (Doc ID 1520584.1)

Last updated on JUNE 05, 2019

Applies to:

Oracle TimesTen In-Memory Database - Version 11.2.2.4.0 and later
Information in this document applies to any platform.

Goal

Customer has a setup in Oracle where there are rows in the child tables reference to no parent rows.  When trying to create a cache group including the parent table as root with child tables, the data brought into TimesTen cache tables ended up excluding those rows.  Here is example:

 

SQL> create table te3( a int,b int,primary key(a));

Table created.

SQL> create table te4(a int primary key, b int, foreign key (b)
SQL> references te1(a));
Table created.
SQL>  insert into te3 values(1,1);
1 row created.
SQL> insert into te3 values(2,2);
1 row created.
SQL> insert into te4 values(1, 1);
1 row created.
SQL> insert into te4 values(2,NULL);
1 row created.
SQL>  insert into te4 values(3,1);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from te3;

        A          B
---------- ----------
        1          1
        2          2
SQL> select * from te4;

        A          B
---------- ----------
        1          1
        2
        3          1

Timesten Side
===========

Command> create readonly cache group nulltest1
      >     autorefresh
      >         mode incremental
      >         interval 1000 milliseconds
      >         state ON
      > from
      >     te3( a int,b int,primary key(a)),
      > te4 (a int primary key, b int, foreign key (b) references te3(a));
Command> select * from te3;
< 1, 1 >
< 2, 2 >
2 rows found.
Command> select * from te4;
< 1, 1 >
< 3, 1 >
2 rows found.

Only two rows in the te4 table.

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.