cachegroup:主库多表

主库多表cachegroup就是一个cachegroup里有一张主表,大于等于一张子表。

1、一张主表,一张子表:

$ ttisql "dsn=tt_cachegroup;uid=cache_user;pwd=timesten;oraclepwd=oracle";
Copyright (c) 1996-2011, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "dsn=tt_cachegroup;uid=cache_user;pwd=timesten;oraclepwd=oracle";
Connection successful: DSN=tt_cachegroup;UID=cache_user;DataStore=/opt/TimesTen/tt1122_64/info/tt_cachegroup;DatabaseCharacterSet=UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/opt/TimesTen/tt1122_64/lib/libtten.so;PermSize=100;TempSize=32;CkptFrequency=120;CkptLogVolume=0;TypeMode=0;OracleNetServiceName=noctest;
(Default setting AutoCommit=1)

Command> create readonly cache group cache_SOL_CONFIG_AUTH
       > Autorefresh interval 5 seconds mode incremental
       > from
pin74.SOL_CONFIG_AUTH_INFO_T(
       > OBJ_ID0 NUMBER(38) primary key,ACCOUNT_SESSION NUMBER(38),CALLEDID VARCHAR2(60),CLASS VARCHAR2(100),FILTER VARCHAR2(60),FLAG NUMBER(38),INTERIM NUMBER(38),
       > IPPOOL VARCHAR2(60),MAX_TIME NUMBER(38),NAME VARCHAR2(60),SERVICE_SESSION NUMBER(38),SESSION_FLAG NUMBER(38),TAG NUMBER(38),TEMPLATE VARCHAR2(200),TYPE NUMBER(38)),
       >
pin74.SOL_CONFIG_AUTH_PERMIT_T(
       > OBJ_ID0 NUMBER(38),REC_ID NUMBER(38),START_T NUMBER(38),STOP_T NUMBER(38),TIME_FLAG NUMBER(38),primary key(OBJ_ID0,REC_ID),foreign key(OBJ_ID0)
       > references
pin74.SOL_CONFIG_AUTH_INFO_T(obj_id0));
Command> load cache group cache_SOL_CONFIG_AUTH commit every 10 rows;

98 cache instances affected.

2、一张主表两张子表:

Command> create readonly cache group cache_sol_service
       > Autorefresh interval 5 seconds mode incremental
       > from
pin74.SOL_SERVICE_INFO_T(
       > OBJ_ID0 NUMBER(38) primary key,CONFIG_OBJ_DB NUMBER(38),CONFIG_OBJ_ID0 NUMBER(38),CONFIG_OBJ_TYPE VARCHAR2(255),CONFIG_OBJ_REV NUMBER(38),
       > FLAG NUMBER(38),GOLDEN_PATH VARCHAR2(60),IPADDR VARCHAR2(20),IPMASK VARCHAR2(20),ITMS NUMBER(38),
       > MAIL_SIZE NUMBER(38),MAIL_STATUS NUMBER(38),NOTE VARCHAR2(255),PERMIT VARCHAR2(60),ZONE_CODE VARCHAR2(40)),
       > pin
74.sol_service_bind_t(
       > OBJ_ID0 NUMBER(38),REC_ID NUMBER(38),CALLID VARCHAR2(200),FLAG NUMBER(38),NOTE VARCHAR2(255),PVC VARCHAR2(200),TYPE NUMBER(38),
       > primary key(obj_id0,rec_id),foreign key(obj_id0) references pin.SOL_SERVICE_INFO_T(obj_id0)),
       >
pin74.sol_service_speed_t(
       > OBJ_ID0 NUMBER(38),REC_ID NUMBER(38),DOWNBAND NUMBER(38),FINISH_T NUMBER(38),FLAG NUMBER(38),UPBAND NUMBER(38),VALUE VARCHAR2(60),primary key(obj_id0,rec_id),
       > foreign key(obj_id0) references
pin74.SOL_SERVICE_INFO_T(obj_id0));
Command> load cache group cache_sol_service commit every 10 rows;

380 cache instances affected.
Command>

3、cachegroups显示:

Command> cachegroups;

Cache Group CACHE_USER.CACHE_SOL_CONFIG_AUTH:

  Cache Group Type: Read Only
  Autorefresh: Yes
  Autorefresh Mode: Incremental
  Autorefresh State: On
  Autorefresh Interval: 5 Seconds
  Autorefresh Status: ok
  Aging: No aging defined

  Root Table: PIN.SOL_CONFIG_AUTH_INFO_T
  Table Type: Read Only

  Child Table: PIN.SOL_CONFIG_AUTH_PERMIT_T
  Table Type: Read Only


Cache Group CACHE_USER.CACHE_SOL_SERVICE:


  Cache Group Type: Read Only
  Autorefresh: Yes
  Autorefresh Mode: Incremental
  Autorefresh State: On
  Autorefresh Interval: 5 Seconds
  Autorefresh Status: ok
  Aging: No aging defined

  Root Table: PIN.SOL_SERVICE_INFO_T
  Table Type: Read Only

  Child Table: PIN.SOL_SERVICE_BIND_T
  Table Type: Read Only

  Child Table: PIN.SOL_SERVICE_SPEED_T
  Table Type: Read Only


你可能感兴趣的:(cache,session,service,command,filter,table)