Now we can extract the execution plans that Oracle built at runtime by simply calling dbms_xplan.display_awr. As you see, Oracle captured 2 different execution plans. One with FTS, and another with index range scan. This is exactly what we want.

As of 10g, Oracle gathers index statistics when index is created or rebuilt(_optimizer_compute_index_stats parameter). So there’s no need to recollect the index statistics except for some special cases.

As to “no_invalidate=>false” parameter, this is not requisite.

1. With table t1 creation, all cursors dependent on table t1 would have been invalidated.

2. With index creation on table t1, all cursors dependent on table t1 would have been invalidated.

So, no need to invalidate the current cursor. It’s just copied from my common test scripts. Sorry for the confusing.