<p>I have a few questions about optimizing this type of load.</p>

<p>One builds a new table of data to be loaded into a partitioned table and then builds the indexes on this new table. </p>

<ol>
<li><p>Should you build the index with the COMPUTE STATISTICS option or use the Cascade option of the DBMS_Stats?</p></li>
<li><p>Should you gather stats on the table before the swap or on the partition after the swap?</p></li>
<li><p>If you do it after the swap and you specify the partition name in the parameter list, what interplay does the granularity parameter have? For instance, if I specify a partition name and then set granularity to 'GLOBAL AND PARTITION' does that do Global at all? Does it do <em>just</em> that one partition?</p></li>
</ol>

```
DBMS_STATS
```
is considered the proper way to calculate statistics for this version. Building the index with the
```
COMPUTE STATISTICS
```
is doable, but usually you want to calculate all your stats at one time and take snapshots.
You want to gather stats after the swap. This way the optimizer will make the best guess for executing queries using that partitions' data.
Why would you put both?