博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Oracle]跨越 DBLINK 访问表时,数据缓存在何处的Data Buffer 中?
阅读量:6720 次
发布时间:2019-06-25

本文共 3522 字,大约阅读时间需要 11 分钟。

结论是存储在 remote 端,这其实也很好理解。在远端能高效率地计算,当然应当在远端完成缓存和检索。


■ Before query execution via DBLINK:


===========

DBLINK destination (remote side):


conn u2 / u2

create table tab002 as select * from dba_objects;


shu immediate

startup


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U 2'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected.


===========

Local side:


conn u3 / u3


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U 2'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected.


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U3'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected.


■ Query execution via DBLINK:


SQL> select count (*) from tab002 @ dbk;


COUNT (*)

----------

   69263


conn u3 / u3


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U 2'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected. <<<<<<<<<<< Cache has no related information


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U3'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected. <<<<<<<<<<< Cache has no related information


===========

DBLINK destination (remote side):


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U 2'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


OWNER

-------------------------------------------------------------------- ------------------------------

OBJECT_NAME

-------------------------------------------------------------------- ------------------------------

OBJECT_TYPE BUFFER_POOL

-------------------------------------------------------------------- ------- ---------------------

 BUFFERS

----------

U2

TAB 002

TABLE DEFAULT

    2042 <<<<<<<<<<<<<<<<<< data got into the cache.


select o.owner, o.object_name, o.object_type, s.buffer_pool, count (*) buffer

 from dba_objects o, v $ bh b, dba_segments s

 where b.objd = o.data_object_id

 and o.owner = 'U3'

 and o.object_name = s.segment_name

 and o.object_type = s.segment_type

 group by o.owner, o.object_name, o.object_type, o.status, s.buffer_pool

 order by buffers;


A record was not selected.

本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/p/7575226.html,如需转载请自行联系原作者

你可能感兴趣的文章
Spring的一些配置文件的使用
查看>>
芒果数据库配置文件
查看>>
UIImagePickerController-设置相机(全屏)
查看>>
PL/SQL结构
查看>>
TX Text Control文字处理教程(7)邮件合并
查看>>
ActiveReports 报表应用教程 (6)---分组报表
查看>>
date
查看>>
ReflectUtil
查看>>
MySQL show processlist;命令详解
查看>>
TCP报文结构
查看>>
架构组织形式的讨论,以及架构师之路的建议
查看>>
详解JavaScript模块化开发
查看>>
C之有符号与无符号(二)
查看>>
DOCKER网络代理设置
查看>>
javascript基础语法——变量和标识符
查看>>
Java静态变量、非静态变量、成员变量、的区别
查看>>
数据库中有外键时JavaBean的写法
查看>>
linux-sed
查看>>
16.4-16.8 Tomcat监听80端口,Tomcat的虚拟主机,访问日志
查看>>
app客户端测试
查看>>