3

I have created a cluster and a two tables emp and sep on the cluster.

Now when I do the simple query...

explain plan select * from emp_cluster join dep_cluster using (dno)

...the cost is 26.

I created two other tables on heap (emp_heap and dep_heap) and the when I do...

explain plan select * from emp_heap join dep_heap using (dno)

...the cost is only 15.

Which is less than that of cluster. I have inserted 33000 records in the emp tables and 99 records in the department tables. I know that in join cluster behaves good but in my case it is opposite...?

require_once
  • 1,980
  • 3
  • 20
  • 29

1 Answers1

4

Possible causes:

  • Statistics out of date
  • The clustered tables are fragmented or have low fill factor

Please post the two plans.

usr
  • 165,323
  • 34
  • 234
  • 359