1. 程式人生 > 其它 >OGG時延問題記錄

OGG時延問題記錄

1.抽取程序延時

2.過程時間分析指令碼

[oracle@node2 dirdat]$ cat test01.sh 
#!/bin/bash
echo "sql before time is "`date`>> test.log
sqlplus / as sysdba <<EOF
@1.sql
EOF
echo "sql after time is "`date`>> test.log
while true
do
	echo `stat st000000033 |grep Modify` >>test.log
done

  

insert into test07 (BIGINT_FIELD, DOUBLE_FIELD, BOOLEAN_FIELD, TIMESTAMP_FIELD, STRING_FIELD, START_TIME)
values (1, 3, '', null, '', sysdate);
truncate table test07;


select * from test07
select * from ogg12t.test07;
truncate table ogg12t.test07;

select arr_time-start_time from ogg12t.test07;

 

源端

-- Create table
create table TEST07
(
  BIGINT_FIELD    INTEGER,
  DOUBLE_FIELD    NUMBER,
  BOOLEAN_FIELD   VARCHAR2(2),
  TIMESTAMP_FIELD DATE,
  STRING_FIELD    VARCHAR2(1024),
  START_TIME      TIMESTAMP(6) default sysdate
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64
    next 8
    minextents 1
    maxextents unlimited
  );  

 目標端:

create table OGG12T.TEST07
(
  BIGINT_FIELD    INTEGER,
  DOUBLE_FIELD    NUMBER,
  BOOLEAN_FIELD   VARCHAR2(2),
  TIMESTAMP_FIELD DATE,
  STRING_FIELD    VARCHAR2(1024),
  START_TIME      TIMESTAMP(6),
  ARR_TIME        TIMESTAMP(6) default sysdate
)

  

We only live once, and time just goes by.