There are a couple of optimiser parameters which are often used to make a database, session or query more OLTP, or more batch, in nature:
Consequently the hint below might be used in a large "batch like" query being run in an OLTP database, to inform the optimiser that it should be treated as a "large" or batch type query:
/*+ OPT_PARAM('optimizer_index_cost_adj', 10000) OPT_PARAM('optimizer_index_caching', 0) */
When running ad hoc queries, the following can be used to change your current session (all subsequent session queries) to be more "batch like":
ALTER SESSION SET "optimizer_index_cost_adj" = 10000; ALTER SESSION SET "optimizer_index_caching" = 0;
Similarly the hint below might be used in an "OLTP like" query being run in a batch/warehouse database, to inform the optimiser that it should be treated as far as possible as an OLTP type query:
/*+ OPT_PARAM('optimizer_index_cost_adj', 0) OPT_PARAM('optimizer_index_caching', 100) */
When running ad hoc queries, the following can be used to change your current session (all subsequent session queries) to be more "OLTP like":
ALTER SESSION SET "optimizer_index_cost_adj" = 0; ALTER SESSION SET "optimizer_index_caching" = 100;