nested loop join探讨
概述:本测试创建两个测试表,t1中有记录10万条,t2中记录10条。分别创造不同的条件,进行nested loop join,并比较不同条件下产生的逻辑读数量。在测试中均加了相应的hints,以避开优化器自动产生的执行计划。1. ...
PGA使用大小与pga_aggregate_target参数的无关性测试
PGA的使用到底受什么限制,是pga_aggregate_target吗?答案是否定的,根据TOM的说法,做了如下测试:SQL> create or replace package demo_pkgas type array is table o...
学习v$librarycache视图
通过查看v$librarycache视图,可以监控library cache的活动情况,进一步衡量share pool设置是否合理。其中 RELOADS 列,表示对象被重新加载的次数,在一个设置合理的系统里,这个数...
创建索引时对表加什么锁
1. 在没有加online选项的情况下,创建索引session 1:SQL> select sid from v$mystat where rownum=1; SID---------- 10&n...
学习视图 v$sql_shared_cursor
V$SQL_SHARED_CURSOR explains why a particular child cursor is not shared with existing child cursors. Each column identifies a specific reason why the cursor cannot be shared.这个视图是用来查看sql没...
exp---巧用管道技术实现导出并压缩数据到多个文件
利用管道技术,可以实现exp过程中边导出边压缩的功能,由于数据量较大,可以将导出数据分布到多个文件中,以下脚本实现了此功能:1.以root用户建立管道文件并修改权限mknod /ora10g/test...
10g中db_recovery_file_dest和log_archive_dest参数的关系
在10g中,如果指定了db_recovery_file_dest 参数,那么归档日志将存放到这个参数指向的目录下,如果同时指定了log_archive_desc,则将同时往这两个参数指定的目录中归档。1.只设置db_recovery_file_desc参数,...
查看granule size 的视图V$SGA_DYNAMIC_COMPONENTS
SQL> desc V$SGA_DYNAMIC_COMPONENTS Name ...
TOM关于同步io和异步io的精彩解释
DBWR must write blocks to the datafiles and ensure they get written. These blocks are protected by redo in the oneline redo log. Before we can reuse a redo log file, we must ensure that the blocks...
AWR基本管理
通过DBMS_WORKLOAD_REPOSITORY包,可以对AWR进行基本的管理。在默认的情况下,oracle是每一小时采集一次快照,下面简要介绍一下手动管理:1.手动创建快照:SQL> / SNAP_ID &n...
值夜班
值夜班,通宵,早上8:18,回去睡觉。
初识表压缩(二)
再对比一下压缩表和非压缩表在读方面的性能:SQL> alter session set sql_trace=true; Session altered. SQL> select count(*) from test_nocompress; COUNT(*)---------- ...
初识表压缩(一)
在concepts里有如下解释:Table CompressionOracle's table compression feature compresses data by eliminating duplicate values in a database block. Compressed data stored in a database block (also know...
unique index和non-unique index的区别
今天在看concept时,看到这样一句话:For a unique index, one rowid exists for each data value. For a nonunique index, therowid is included in the key in sorted order, so nonunique indexes are sorted by ...
concepts-Consistent and Inconsistent Backups
Consistent and Inconsistent BackupsA consistent backup is one in which the files being backed up contain all changes up to the same system change number (SCN). This means that the files in the backup...
一例cache buffers chain等待诊断思路
今日在生产系统上业务高峰期时遇到了latch free等待,top 5等待如下:Top 5 Timed Events~~~~~~~~~~~~~~~~~~ &...
当type为TX时v$lock中ID1,ID2的含义
SQL> select * from v$lock where sid=19; ADDR KADDR SID TY ID1 &n...
使用10046事件跟踪sql定位错误一例
修改一个表时,发生如下错误:SQL> update emp set ename='adsf';update emp set ename='adsf' *ERROR at line 1:ORA-12096: error in materialized view log on "SCOTT"."EMP...
rownum的处理机制(转)
在Oracle中,要按特定条件查询前N条记录,用个rownum就搞定了。 select * from emp where rownum <= 5 而且书上也告诫,不能对rownum用">",这也就意味着,如果你想用 select * from emp where rownum > 5 则是失败...
ORA-02085 database link string connects to string解决
当使用全局数据库命名的时候(global_names=TRUE),数据库链接(DATABASE LINK)的名字必须和数据库的名字相同。SQL> create database linke mv_link 2&n...