April 2008
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
282930  

Automatic Statistics Gathering Job

Automation usually is a good thing, but sometimes it can make thing goes strange.
I came across this situation just now, even I thought maybe it should be an bug in CBO, before I discovered that the cause is the automatic statistics gathering.
Below is the output of this case.

SQL> delete from A a  2  WHERE exists  [...]

Relationship between DOP and Number of Hash Partitions (2)

Another relationship between DOP and number of hash partitions is that when doing partition wise sort, the number of partitions should be twice greater than DOP.
Similarly, firstly we create the table for testing. then insert data, then gather statistics.

SQL> CREATE TABLE fact_a(
2 date_key date,
3 part_col1 NUMBER
4 [...]

Relationship between DOP and Number of Hash Partitions (1)

In 10gR2 or 11gR1, when doing partition wise join, the number of hash partitions should be equal to DOP. Otherwise, the execution plan must become worse.
First, I will create two tables, fact_a and fact_b, both are partitioned by hash, and have hash partitions 4.

SQL> CREATE TABLE fact_a(
2 date_key date,
3 [...]