0

I have created one Temp table which is truncated and load from Informatica Powercenter.

My question is those temp tables required DBSTATS, after the truncate and load happened? or it will automatically take the DBSTATS. because I'm facing an issue at the first time load. second time load looks fine

Cyberking
  • 1
  • 1
  • it is a temporary table created as `create global temporary table` or just a table you think is temporary because you truncate it ? – Roberto Hernandez Sep 29 '21 at 13:54
  • its just a normal table, but before load we usually truncate it and load fresh data – Cyberking Sep 29 '21 at 14:17
  • then check my post. If you are using any of these ways to load, and it is Oracle 12cR1 or higher, you don't need to calculate statistics – Roberto Hernandez Sep 29 '21 at 14:53
  • You have problem with the *load* (i.e. `insert` in a *truncated* table). Why do you think *object statistics* of the **target** table would play any role? – Marmite Bomber Sep 29 '21 at 17:38
  • @MarmiteBomber i guess after inserting millions of records on the table, need to take stats – Cyberking Sep 30 '21 at 13:19
  • This is exact the confusion. Do you have problems *with the load* (as you say) or *after the load*. You should describe it more clearly, see e.g. [here](https://stackoverflow.com/a/34975420/4808122) – Marmite Bomber Sep 30 '21 at 13:23

1 Answers1

0

Starting with Oracle 12cR1, Oracle will gather automatic statistics in bulk load operations, making it unnecessary to gather statistics subsequently. This means extra table scans for statistics collection are unnecessary and there is less chance that you will forget to gather statistics after bulk loads.

  • Operations such as CTAS
  • Bulk direct path insert select
  • A bulk load into an empty partitioned table will trigger the gathering of global statistics, but no partition-level statistics.

In any of these cases, you won't need to gather statistics, Oracle will do it automatically.

Roberto Hernandez
  • 8,231
  • 3
  • 14
  • 43