10053只有在硬解析的时候生成。
set line 200 set pages 200 @10053.sql select /* Sample 2^^*/ a.ename from emp a, dept b where (a.deptno = b.deptno and a.sal>1500 and b.dname='SALES') or( a.deptno = b.deptno and a.sal> 1500 and b.dname = 'RESEARCH' ); select * from table(dbms_xplan.display_cursor(null,null,'last')); @10053d.sql
oracle会把以上sql transformation成
select
/* Sample2^^*/
a
.ename
from
emp a
,
dept b
where
a
.deptno
=
b
.deptno
and
a
.
sal
>
1500
and (b .dname = 'SALES' or b .dname = 'RESEARCH' ) ;
10053
-
Trace file /u01 /app /oracle /diag /rdbms /prod /prod1 /trace /prod1_ora_4890 .trc
-
Oracle Database 11g Enterprise Edition Release 11 .2 . .1 .0 - Production
-
With the Partitioning , Real Application Clusters , Automatic Storage Management , OLAP ,
-
Data Mining and Real Application Testing options
-
ORACLE_HOME = /u01 /app /oracle /product /11 .2 . /db_1
-
System name : Linux
-
Node name : node1
-
Release : 2 .6 .18 -194 .el5
-
Version : #1 SMP Tue Mar 16 21 :52 :43 EDT 2010
-
Machine : i686
-
Instance name : prod1
-
Redo thread mounted by this instance : 1
-
Oracle process number : 33
-
Unix process pid : 4890 , image : oracle @node1 (TNS V1 -V3 )
-
-
-
* * * 2014 -11 -01 05 :01 :29 .664
-
* * * SESSION ID : (59 .615 ) 2014 -11 -01 05 :01 :29 .664
-
* * * CLIENT ID : ( ) 2014 -11 -01 05 :01 :29 .664
-
* * * SERVICE NAME : (SYS$USERS ) 2014 -11 -01 05 :01 :29 .664
-
* * * MODULE NAME : (SQL *Plus ) 2014 -11 -01 05 :01 :29 .664
-
* * * ACTION NAME : ( ) 2014 -11 -01 05 :01 :29 .664
-
-
Registered qb : SEL$1 0x883604 (PARSER )
-
---------------------
-
QUERY BLOCK SIGNATURE
-
---------------------
-
signature ( ) : qb_name =SEL$1 nbfros =2 flg =
-
fro ( ) : flg =4 objn =73181 hint_alias = "A" @ "SEL$1"
-
fro (1 ) : flg =4 objn =73179 hint_alias = "B" @ "SEL$1"
-
-
SPM : statement not found in SMB
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Automatic degree of parallelism (ADOP )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Automatic degree of parallelism is disabled : Parameter .
-
-
PM : Considering predicate move -around in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Predicate Move -Around (PM )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
OPTIMIZER INFORMATION
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
----- Current SQL Statement for this session (sql_id=5z7wqfry426ch) -----
-
select /* Sample 2^^*/ a .ename from emp a , dept b
-
where (a .deptno = b .deptno
-
and a .sal >1500
-
and b .dname = 'SALES' )
-
or (
-
a .deptno = b .deptno
-
and a .sal > 1500
-
and b .dname = 'RESEARCH'
-
)
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Legend
-
The following abbreviations are used by optimizer trace .
-
CBQT - cost -based query transformation
-
JPPD - join predicate push -down
-
OJPPD - old -style (non -cost -based ) JPPD
-
FPD - filter push -down
-
PM - predicate move -around
-
CVM - complex view merging
-
SPJ - select -project -join
-
SJC - set join conversion
-
SU - subquery unnesting
-
OBYE - order by elimination
-
OST - old style star transformation
-
ST - new (cbqt ) star transformation
-
CNT - count ( col ) to count ( * ) transformation
-
JE - Join Elimination
-
JF - join factorization
-
SLP - select list pruning
-
DP - distinct placement
-
qb - query block
-
LB - leaf blocks
-
DK - distinct keys
-
LB /K - average number of leaf blocks per key
-
DB /K - average number of data blocks per key
-
CLUF - clustering factor
-
NDV - number of distinct values
-
Resp - response cost
-
Card - cardinality
-
Resc - resource cost
-
NL - nested loops (join )
-
SM - sort merge (join )
-
HA - hash (join )
-
CPUSPEED - CPU Speed
-
IOTFRSPEED - I /O transfer speed
-
IOSEEKTIM - I /O seek time
-
SREADTIM - average single block read time
-
MREADTIM - average multiblock read time
-
MBRC - average multiblock read count
-
MAXTHR - maximum I /O system throughput
-
SLAVETHR - average slave I /O throughput
-
dmeth - distribution method
-
1 : no partitioning required
-
2 : value partitioned
-
4 : right is random ( round -robin )
-
128 : left is random ( round -robin )
-
8 : broadcast right and partition left
-
16 : broadcast left and partition right
-
32 : partition left using partitioning of right
-
64 : partition right using partitioning of left
-
256 : run the join in serial
-
0 : invalid distribution method
-
sel - selectivity
-
ptn - partition
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
PARAMETERS USED BY THE OPTIMIZER
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
PARAMETERS WITH ALTERED VALUES
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Compilation Environment Dump
-
parallel_max_degree = 4
-
Bug Fix Control Environment
-
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
PARAMETERS WITH DEFAULT VALUES
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Compilation Environment Dump
-
optimizer_mode_hinted = false
-
optimizer_features_hinted = 0 . .
-
parallel_execution_enabled = true
-
parallel_query_forced_dop = 0
-
parallel_dml_forced_dop = 0
-
parallel_ddl_forced_degree = 0
-
parallel_ddl_forced_instances = 0
-
_query_rewrite_fudge = 90
-
optimizer_features_enable = 11 .2 . .1
-
_optimizer_search_limit = 5
-
cpu_count = 1
-
active_instance_count = 2
-
parallel_threads_per_cpu = 2
-
hash_area_size = 131072
-
bitmap_merge_area_size = 1048576
-
sort_area_size = 65536
-
sort_area_retained_size = 0
-
_sort_elimination_cost_ratio = 0
-
_optimizer_block_size = 8192
-
_sort_multiblock_read_count = 2
-
_hash_multiblock_io_count = 0
-
_db_file_optimizer_read_count = 8
-
_optimizer_max_permutations = 2000
-
pga_aggregate_target = 339968 KB
-
_pga_max_size = 204800 KB
-
_query_rewrite_maxdisjunct = 257
-
_smm_auto_min_io_size = 56 KB
-
_smm_auto_max_io_size = 248 KB
-
_smm_min_size = 339 KB
-
_smm_max_size = 67993 KB
-
_smm_px_max_size = 169984 KB
-
_cpu_to_io = 0
-
_optimizer_undo_cost_change = 11 .2 . .1
-
parallel_query_mode = enabled
-
parallel_dml_mode = disabled
-
parallel_ddl_mode = enabled
-
optimizer_mode = all_rows
-
sqlstat_enabled = false
-
_optimizer_percent_parallel = 101
-
_always_anti_join = choose
-
_always_semi_join = choose
-
_optimizer_mode_force = true
-
_partition_view_enabled = true
-
_always_star_transformation = false
-
_query_rewrite_or_error = false
-
_hash_join_enabled = true
-
cursor_sharing = exact
-
_b_tree_bitmap_plans = true
-
star_transformation_enabled = false
-
_optimizer_cost_model = choose
-
_new_sort_cost_estimate = true
-
_complex_view_merging = true
-
_unnest_subquery = true
-
_eliminate_common_subexpr = true
-
_pred_move_around = true
-
_convert_set_to_join = false
-
_push_join_predicate = true
-
_push_join_union_view = true
-
_fast_full_scan_enabled = true
-
_optim_enhance_nnull_detection = true
-
_parallel_broadcast_enabled = true
-
_px_broadcast_fudge_factor = 100
-
_ordered_nested_loop = true
-
_no_or_expansion = false
-
optimizer_index_cost_adj = 100
-
optimizer_index_caching = 0
-
_system_index_caching = 0
-
_disable_datalayer_sampling = false
-
query_rewrite_enabled = true
-
query_rewrite_integrity = enforced
-
_query_cost_rewrite = true
-
_query_rewrite_2 = true
-
_query_rewrite_1 = true
-
_query_rewrite_expression = true
-
_query_rewrite_jgmigrate = true
-
_query_rewrite_fpc = true
-
_query_rewrite_drj = true
-
_full_pwise_join_enabled = true
-
_partial_pwise_join_enabled = true
-
_left_nested_loops_random = true
-
_improved_row_length_enabled = true
-
_index_join_enabled = true
-
_enable_type_dep_selectivity = true
-
_improved_outerjoin_card = true
-
_optimizer_adjust_for_nulls = true
-
_optimizer_degree = 0
-
_use_column_stats_for_function = true
-
_subquery_pruning_enabled = true
-
_subquery_pruning_mv_enabled = false
-
_or_expand_nvl_predicate = true
-
_like_with_bind_as_equality = false
-
_table_scan_cost_plus_one = true
-
_cost_equality_semi_join = true
-
_default_non_equality_sel_check = true
-
_new_initial_join_orders = true
-
_oneside_colstat_for_equijoins = true
-
_optim_peek_user_binds = true
-
_minimal_stats_aggregation = true
-
_force_temptables_for_gsets = false
-
workarea_size_policy = auto
-
_smm_auto_cost_enabled = true
-
_gs_anti_semi_join_allowed = true
-
_optim_new_default_join_sel = true
-
optimizer_dynamic_sampling = 2
-
_pre_rewrite_push_pred = true
-
_optimizer_new_join_card_computation = true
-
_union_rewrite_for_gs = yes_gset_mvs
-
_generalized_pruning_enabled = true
-
_optim_adjust_for_part_skews = true
-
_force_datefold_trunc = false
-
statistics_level = typical
-
_optimizer_system_stats_usage = true
-
skip_unusable_indexes = true
-
_remove_aggr_subquery = true
-
_optimizer_push_down_distinct = 0
-
_dml_monitoring_enabled = true
-
_optimizer_undo_changes = false
-
_predicate_elimination_enabled = true
-
_nested_loop_fudge = 100
-
_project_view_columns = true
-
_local_communication_costing_enabled = true
-
_local_communication_ratio = 50
-
_query_rewrite_vop_cleanup = true
-
_slave_mapping_enabled = true
-
_optimizer_cost_based_transformation = linear
-
_optimizer_mjc_enabled = true
-
_right_outer_hash_enable = true
-
_spr_push_pred_refspr = true
-
_optimizer_cache_stats = false
-
_optimizer_cbqt_factor = 50
-
_optimizer_squ_bottomup = true
-
_fic_area_size = 131072
-
_optimizer_skip_scan_enabled = true
-
_optimizer_cost_filter_pred = false
-
_optimizer_sortmerge_join_enabled = true
-
_optimizer_join_sel_sanity_check = true
-
_mmv_query_rewrite_enabled = true
-
_bt_mmv_query_rewrite_enabled = true
-
_add_stale_mv_to_dependency_list = true
-
_distinct_view_unnesting = false
-
_optimizer_dim_subq_join_sel = true
-
_optimizer_disable_strans_sanity_checks = 0
-
_optimizer_compute_index_stats = true
-
_push_join_union_view2 = true
-
_optimizer_ignore_hints = false
-
_optimizer_random_plan = 0
-
_query_rewrite_setopgrw_enable = true
-
_optimizer_correct_sq_selectivity = true
-
_disable_function_based_index = false
-
_optimizer_join_order_control = 3
-
_optimizer_cartesian_enabled = true
-
_optimizer_starplan_enabled = true
-
_extended_pruning_enabled = true
-
_optimizer_push_pred_cost_based = true
-
_optimizer_null_aware_antijoin = true
-
_optimizer_extend_jppd_view_types = true
-
_sql_model_unfold_forloops = run_time
-
_enable_dml_lock_escalation = false
-
_bloom_filter_enabled = true
-
_update_bji_ipdml_enabled = 0
-
_optimizer_extended_cursor_sharing = udo
-
_dm_max_shared_pool_pct = 1
-
_optimizer_cost_hjsmj_multimatch = true
-
_optimizer_transitivity_retain = true
-
_px_pwg_enabled = true
-
optimizer_secure_view_merging = true
-
_optimizer_join_elimination_enabled = true
-
flashback_table_rpi = non_fbt
-
_optimizer_cbqt_no_size_restriction = true
-
_optimizer_enhanced_filter_push = true
-
_optimizer_filter_pred_pullup = true
-
_rowsrc_trace_level = 0
-
_simple_view_merging = true
-
_optimizer_rownum_pred_based_fkr = true
-
_optimizer_better_inlist_costing = all
-
_optimizer_self_induced_cache_cost = false
-
_optimizer_min_cache_blocks = 10
-
_optimizer_or_expansion = depth
-
_optimizer_order_by_elimination_enabled = true
-
_optimizer_outer_to_anti_enabled = true
-
_selfjoin_mv_duplicates = true
-
_dimension_skip_null = true
-
_force_rewrite_enable = false
-
_optimizer_star_tran_in_with_clause = true
-
_optimizer_complex_pred_selectivity = true
-
_optimizer_connect_by_cost_based = true
-
_gby_hash_aggregation_enabled = true
-
_globalindex_pnum_filter_enabled = true
-
_px_minus_intersect = true
-
_fix_control_key = 0
-
_force_slave_mapping_intra_part_loads = false
-
_force_tmp_segment_loads = false
-
_query_mmvrewrite_maxpreds = 10
-
_query_mmvrewrite_maxintervals = 5
-
_query_mmvrewrite_maxinlists = 5
-
_query_mmvrewrite_maxdmaps = 10
-
_query_mmvrewrite_maxcmaps = 20
-
_query_mmvrewrite_maxregperm = 512
-
_query_mmvrewrite_maxmergedcmaps = 50
-
_query_mmvrewrite_maxqryinlistvals = 500
-
_disable_parallel_conventional_load = false
-
_trace_virtual_columns = false
-
_replace_virtual_columns = true
-
_virtual_column_overload_allowed = true
-
_kdt_buffering = true
-
_first_k_rows_dynamic_proration = true
-
_optimizer_sortmerge_join_inequality = true
-
_optimizer_aw_stats_enabled = true
-
_bloom_pruning_enabled = true
-
result_cache_mode = MANUAL
-
_px_ual_serial_input = true
-
_optimizer_skip_scan_guess = false
-
_enable_row_shipping = true
-
_row_shipping_threshold = 80
-
_row_shipping_explain = false
-
transaction_isolation_level = read_commited
-
_optimizer_distinct_elimination = true
-
_optimizer_multi_level_push_pred = true
-
_optimizer_group_by_placement = true
-
_optimizer_rownum_bind_default = 10
-
_enable_query_rewrite_on_remote_objs = true
-
_optimizer_extended_cursor_sharing_rel = simple
-
_optimizer_adaptive_cursor_sharing = true
-
_direct_path_insert_features = 0
-
_optimizer_improve_selectivity = true
-
optimizer_use_pending_statistics = false
-
_optimizer_enable_density_improvements = true
-
_optimizer_aw_join_push_enabled = true
-
_optimizer_connect_by_combine_sw = true
-
_enable_pmo_ctas = 0
-
_optimizer_native_full_outer_join = force
-
_bloom_predicate_enabled = true
-
_optimizer_enable_extended_stats = true
-
_is_lock_table_for_ddl_wait_lock = 0
-
_pivot_implementation_method = choose
-
optimizer_capture_sql_plan_baselines = false
-
optimizer_use_sql_plan_baselines = true
-
_optimizer_star_trans_min_cost = 0
-
_optimizer_star_trans_min_ratio = 0
-
_with_subquery = OPTIMIZER
-
_optimizer_fkr_index_cost_bias = 10
-
_optimizer_use_subheap = true
-
parallel_degree_policy = manual
-
parallel_degree = 0
-
parallel_min_time_threshold = 10
-
_parallel_time_unit = 10
-
_optimizer_or_expansion_subheap = true
-
_optimizer_free_transformation_heap = true
-
_optimizer_reuse_cost_annotations = true
-
_result_cache_auto_size_threshold = 100
-
_result_cache_auto_time_threshold = 1000
-
_optimizer_nested_rollup_for_gset = 100
-
_nlj_batching_enabled = 1
-
parallel_query_default_dop = 0
-
is_recur_flags = 0
-
optimizer_use_invisible_indexes = false
-
flashback_data_archive_internal_cursor = 0
-
_optimizer_extended_stats_usage_control = 224
-
_parallel_syspls_obey_force = true
-
cell_offload_processing = true
-
_rdbms_internal_fplib_enabled = false
-
db_file_multiblock_read_count = 79
-
_bloom_folding_enabled = true
-
_mv_generalized_oj_refresh_opt = true
-
cell_offload_compaction = ADAPTIVE
-
parallel_degree_limit = 65535
-
parallel_force_local = false
-
total_cpu_count = 2
-
cell_offload_plan_display = AUTO
-
_optimizer_coalesce_subqueries = true
-
_optimizer_fast_pred_transitivity = true
-
_optimizer_fast_access_pred_analysis = true
-
_optimizer_unnest_disjunctive_subq = true
-
_optimizer_unnest_corr_set_subq = true
-
_optimizer_distinct_agg_transform = true
-
_aggregation_optimization_settings = 0
-
_optimizer_connect_by_elim_dups = true
-
_optimizer_eliminate_filtering_join = true
-
_connect_by_use_union_all = true
-
dst_upgrade_insert_conv = true
-
advanced_queuing_internal_cursor = 0
-
_optimizer_unnest_all_subqueries = true
-
_bloom_predicate_pushdown_to_storage = true
-
_bloom_vector_elements = 0
-
_bloom_pushing_max = 524288
-
parallel_autodop = 0
-
parallel_ddldml = 0
-
_parallel_cluster_cache_policy = adaptive
-
_parallel_scalability = 50
-
iot_internal_cursor = 0
-
_optimizer_instance_count = 0
-
_optimizer_connect_by_cb_whr_only = false
-
_suppress_scn_chk_for_cqn = nosuppress_1466
-
_optimizer_join_factorization = true
-
_optimizer_use_cbqt_star_transformation = true
-
_optimizer_table_expansion = true
-
_and_pruning_enabled = true
-
_deferred_constant_folding_mode = DEFAULT
-
_optimizer_distinct_placement = true
-
partition_pruning_internal_cursor = 0
-
parallel_hinted = none
-
_sql_compatibility = 0
-
_optimizer_use_feedback = true
-
_optimizer_try_st_before_jppd = true
-
Bug Fix Control Environment
-
fix 3834770 = 1
-
fix 3746511 = enabled
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
PARAMETERS IN OPT_PARAM HINT
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Column Usage Monitoring is ON : tracking level = 1
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-
Considering Query Transformations on query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Query transformations ( QT )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
JF : Checking validity of join factorization for query block SEL$1 ( # ) ---没什么可做的
-
JF : Bypassed : not a UNION or UNION - ALL query block .
-
ST : not valid since star transformation parameter is FALSE
-
TE : Checking validity of table expansion for query block SEL$1 ( # )
-
TE : Bypassed : No partitioned table in query block .
-
CBQT bypassed for query block SEL$1 ( # ) : no complex view , sub -queries or UNION ( ALL ) queries .
-
CBQT : Validity checks failed for 5z7wqfry426ch .
-
CSE : Considering common sub -expression elimination in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Common Subexpression elimination (CSE )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
CSE : CSE performed on query block SEL$1 ( # ) .
-
OBYE : Considering Order - by Elimination from view SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Order - by elimination (OBYE )
-
* * * * * * * * * * * * * * * * * * * * * * * * * * *
-
OBYE : OBYE bypassed : no order by to eliminate .
-
JE : Considering Join Elimination on query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Join Elimination (JE )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = SALES OR B . DNAME = 'RESEARCH' )
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
Query block SEL$1 ( # ) unchanged
-
CVM : Considering view merge in query block SEL$1 ( # )
-
JE : Considering Join Elimination on query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Join Elimination (JE )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME =' SALES' OR B . DNAME = 'RESEARCH' )
-
Query block SEL$1 ( # ) unchanged
-
query block SEL$1 ( # ) unchanged
-
Considering Query Transformations on query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Query transformations (QT )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
JF : Checking validity of join factorization for query block SEL$1 ( # )
-
JF : Bypassed : not a UNION or UNION - ALL query block .
-
ST : not valid since star transformation parameter is FALSE
-
TE : Checking validity of table expansion for query block SEL$1 ( # )
-
TE : Bypassed : No partitioned table in query block .
-
CBQT bypassed for query block SEL$1 ( # ) : no complex view , sub -queries or UNION ( ALL ) queries .
-
CBQT : Validity checks failed for 5z7wqfry426ch .
-
CSE : Considering common sub -expression elimination in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Common Subexpression elimination (CSE )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
CSE : CSE not performed on query block SEL$1 ( # ) .
-
SU : Considering subquery unnesting in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * *
-
Subquery Unnest (SU )
-
* * * * * * * * * * * * * * * * * * * *
-
SJC : Considering set -join conversion in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Set -Join Conversion (SJC )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
SJC : not performed
-
JE : Considering Join Elimination on query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
Join Elimination (JE )
-
* * * * * * * * * * * * * * * * * * * * * * * * *
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * * -----这里说的是没变异之前的sql,但是现实的是他已经给你做完了合并了,这里看不到合并的那一步,"合并"的transformation,可能在sql解析器中就做了合并了,反正最后合并了...
-
有很多transformation是在10053中看不到的。 10053是个外国老头做的,他是个开 发,10053没那么严格
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
JE : cfro : EMP objn :73179 col # :8 dfro :DEPT dcol# :8
-
SQL : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
Query block SEL$1 ( # ) unchanged
-
PM : Considering predicate move -around in query block SEL$1 ( # )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
Predicate Move -Around (PM )
-
* * * * * * * * * * * * * * * * * * * * * * * * * *
-
PM : PM bypassed : Outer query contains no views .
-
PM : PM bypassed : Outer query contains no views .
-
query block SEL$1 ( # ) unchanged
-
FPD : Considering simple filter push in query block SEL$1 ( # )
-
A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
try to generate transitive predicate from check constraints for query block SEL$1 ( # )
-
finally : A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = SALES OR B . DNAME = 'RESEARCH' )
-
-
apadrv - start sqlid =6890391388387613072
-
:
-
call ( in -use =2116 , alloc =16360 ) , compile ( in -use =55108 , alloc =59416 ) , execution ( in -use =2124 , alloc =4060 )
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Peeked values of the binds in SQL statement
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-
Final query after transformations : * * * * * * * UNPARSED QUERY IS * * * * * * *
-
SELECT A . ENAME ENAME FROM SCOTT . EMP A , SCOTT . DEPT B WHERE A . SAL >1500 AND A . DEPTNO = B . DEPTNO AND ( B . DNAME = 'SALES' OR B . DNAME = 'RESEARCH' )
-
kkoqbc : optimizing query block SEL$1 ( # )
-
-
:
-
call ( in -use =2288 , alloc =16360 ) , compile ( in -use =55928 , alloc =59416 ) , execution ( in -use =2124 , alloc =4060 )
-
-
kkoqbc -subheap ( create addr =0x88fb0c )
-
* * * * * * * * * * * * * * * *
-
QUERY BLOCK TEXT
-
* * * * * * * * * * * * * * * *
-
select /* Sample 2^^*/ a .ename from emp a , dept b
-
where (a .deptno = b .deptno
-
and a .sal >1500
-
and b .dname = 'SALES' )
-
or (
-
a .deptno = b .deptno
-
and a .sal > 1500
-
and b .dname = 'RESEARCH'
-
)
-
---------------------
-
QUERY BLOCK SIGNATURE
-
---------------------
-
signature (optimizer ) : qb_name =SEL$1 nbfros =2 flg =
-
fro ( ) : flg =0 objn =73181 hint_alias = "A" @ "SEL$1"
-
fro (1 ) : flg =0 objn =73179 hint_alias = "B" @ "SEL$1"
-
-
-----------------------------
-
SYSTEM STATISTICS INFORMATION
-
-----------------------------
-
Using NOWORKLOAD Stats
-
CPUSPEEDNW : 2696 millions instructions /sec ( default is 100 )
-
IOTFRSPEED : 4096 bytes per millisecond ( default is 4096 )
-
IOSEEKTIM : 10 milliseconds ( default is 10 )
-
MBRC : -1 blocks ( default is 8 )
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
BASE STATISTICAL INFORMATION
-
* * * * * * * * * * * * * * * * * * * * * * *
-
Table Stats : :
-
Table : DEPT Alias : B
-
# Rows : 4 #Blks : 5 AvgRowLen : 20 .00
-
Index Stats : :
-
Index : PK_DEPT Col # : 1
-
LVLS : 0 #LB : 1 #DK : 4 LB /K : 1 .00 DB /K : 1 .00 CLUF : 1 .00
-
* * * * * * * * * * * * * * * * * * * * * * *
-
Table Stats : :
-
Table : EMP Alias : A
-
# Rows : 14 #Blks : 5 AvgRowLen : 41 .00
-
Index Stats : :
-
Index : PK_EMP Col # : 1
-
LVLS : 0 #LB : 1 #DK : 14 LB /K : 1 .00 DB /K : 1 .00 CLUF : 1 .00
-
Access path analysis for EMP
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
SINGLE TABLE ACCESS PATH
-
Single Table Cardinality Estimation for EMP [A ]
-
Table : EMP Alias : A
-
Card : Original : 14 .000000 Rounded : 12 Computed : 12 .10 Non Adjusted : 12 .10
-
Access Path : TableScan
-
Cost : 3 .00 Resp : 3 .00 Degree : 0
-
Cost_io : 3 .00 Cost_cpu : 40287
-
Resp_io : 3 .00 Resp_cpu : 40287
-
* * * * * * trying bitmap /domain indexes * * * * * *
-
Access Path : index (FullScan )
-
Index : PK_EMP
-
resc_io : 1 .00 resc_cpu : 9921
-
ix_sel : 1 .000000 ix_sel_with_filters : 1 .000000
-
Cost : 1 .00 Resp : 1 .00 Degree : 0
-
* * * * * * finished trying bitmap /domain indexes * * * * * *
-
Best : : AccessPath : TableScan
-
Cost : 3 .00 Degree : 1 Resp : 3 .00 Card : 12 .10 Bytes : 0
-
-
Access path analysis for DEPT
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
SINGLE TABLE ACCESS PATH
-
Single Table Cardinality Estimation for DEPT [B ]
-
Table : DEPT Alias : B
-
Card : Original : 4 .000000 Rounded : 2 Computed : 2 .00 Non Adjusted : 2 .00
-
Access Path : TableScan
-
Cost : 3 .00 Resp : 3 .00 Degree : 0
-
Cost_io : 3 .00 Cost_cpu : 36637
-
Resp_io : 3 .00 Resp_cpu : 36637
-
* * * * * * trying bitmap /domain indexes * * * * * *
-
Access Path : index (FullScan )
-
Index : PK_DEPT
-
resc_io : 1 .00 resc_cpu : 7921
-
ix_sel : 1 .000000 ix_sel_with_filters : 1 .000000
-
Cost : 1 .00 Resp : 1 .00 Degree : 0
-
* * * * * * finished trying bitmap /domain indexes * * * * * *
-
Best : : AccessPath : TableScan
-
Cost : 3 .00 Degree : 1 Resp : 3 .00 Card : 2 .00 Bytes : 0
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-
-
OPTIMIZER STATISTICS AND COMPUTATIONS
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
GENERAL PLANS
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Considering cardinality -based initial join order .
-
Permutations for Starting Table :
-
Join order [1 ] : DEPT [B ] #0 EMP [A ] #1
-
-
* * * * * * * * * * * * * * *
-
Now joining : EMP [A ] #1
-
* * * * * * * * * * * * * * *
-
NL Join
-
Outer table : Card : 2 .00 Cost : 3 .00 Resp : 3 .00 Degree : 1 Bytes : 13
-
Access path analysis for EMP
-
Inner table : EMP Alias : A
-
Access Path : TableScan
-
NL Join : Cost : 7 .00 Resp : 7 .00 Degree : 1
-
Cost_io : 7 .00 Cost_cpu : 117372
-
Resp_io : 7 .00 Resp_cpu : 117372
-
* * * * * * trying bitmap /domain indexes * * * * * *
-
Access Path : index (FullScan )
-
Index : PK_EMP
-
resc_io : 1 .00 resc_cpu : 9921
-
ix_sel : 1 .000000 ix_sel_with_filters : 1 .000000
-
Cost : 1 .00 Resp : 1 .00 Degree : 0
-
* * * * * * finished trying bitmap /domain indexes * * * * * *
-
-
Best NL cost : 7 . 00
-
resc : 7 .00 resc_io : 7 .00 resc_cpu : 117372
-
resp : 7 .00 resp_io : 7 .00 resc_cpu : 117372
-
Join Card : 8 .065844 = = outer (2 .000000 ) * inner (12 .098765 ) * sel ( .333333 )
-
Join Card - Rounded : 8 Computed : 8 .07
-
Outer table : DEPT Alias : B
-
resc : 3 .00 card 2 .00 bytes : 13 deg : 1 resp : 3 .00
-
Inner table : EMP Alias : A
-
resc : 3 .00 card : 12 .10 bytes : 16 deg : 1 resp : 3 .00
-
using dmeth : 2 #groups : 1
-
SORT ressource Sort statistics
-
Sort width : 396 Area size : 347136 Max Area size : 69624832
-
Degree : 1
-
Blocks to Sort : 1 Row size : 25 Total Rows : 2
-
Initial runs : 1 Merge passes : 0 IO Cost / pass : 0
-
Total IO sort cost : 0 Total CPU sort cost : 32352758
-
Total Temp space used : 0
-
SORT ressource Sort statistics
-
Sort width : 396 Area size : 347136 Max Area size : 69624832
-
Degree : 1
-
Blocks to Sort : 1 Row size : 28 Total Rows : 12
-
Initial runs : 1 Merge passes : 0 IO Cost / pass : 0
-
Total IO sort cost : 0 Total CPU sort cost : 32354606
-
Total Temp space used : 0
-
SM join : Resc : 8 .00 Resp : 8 .00 [multiMatchCost = .00 ]
-
SM Join
-
SM cost : 8 . 00
-
resc : 8 .00 resc_io : 6 .00 resc_cpu : 64784289
-
resp : 8 .00 resp_io : 6 .00 resp_cpu : 64784289
-
SM Join ( with index on outer )
-
Access Path : index (FullScan )
-
Index : PK_DEPT
-
resc_io : 2 .00 resc_cpu : 16073
-
ix_sel : 1 .000000 ix_sel_with_filters : 1 .000000
-
Cost : 2 .00 Resp : 2 .00 Degree : 1
-
Outer table : DEPT Alias : B
-
resc : 2 .00 card 2 .00 bytes : 13 deg : 1 resp : 2 .00
-
Inner table : EMP Alias : A
-
resc : 3 .00 card : 12 .10 bytes : 16 deg : 1 resp : 3 .00
-
using dmeth : 2 #groups : 1
-
SORT ressource Sort statistics
-
Sort width : 396 Area size : 347136 Max Area size : 69624832
-
Degree : 1
-
Blocks to Sort : 1 Row size : 28 Total Rows : 12
-
Initial runs : 1 Merge passes : 0 IO Cost / pass : 0
-
Total IO sort cost : 0 Total CPU sort cost : 32354606
-
Total Temp space used : 0
-
SM join : Resc : 6 .00 Resp : 6 .00 [multiMatchCost = .00 ]
-
Outer table : DEPT Alias : B
-
resc : 3 .00 card 2 .00 bytes : 13 deg : 1 resp : 3 .00
-
Inner table : EMP Alias : A
-
resc : 3 .00 card : 12 .10 bytes : 16 deg : 1 resp : 3 .00
-
using dmeth : 2 #groups : 1
-
Cost per ptn : 0 .50 #ptns : 1
-
hash_area : 124 ( max =16999 ) buildfrag : 1 probefrag : 1 ppasses : 1
-
Hash join : Resc : 6 .50 Resp : 6 .50 [multiMatchCost = .00 ]
-
HA Join
-
HA cost : 6 . 50
-
resc : 6 .50 resc_io : 6 .00 resc_cpu : 16254759
-
resp : 6 .50 resp_io : 6 .00 resp_cpu : 16254759
-
Best : : JoinMethod : SortMerge
-
Cost : 6 .00 Degree : 1 Resp : 6 .00 Card : 8 .07 Bytes : 29
-
* * * * * * * * * * * * * * * * * * * * * * *
-
Best so far : Table # : 0 cost : 2 .0005 card : 2 .0000 bytes : 26
-
Table # : 1 cost : 6 .0018 card : 8 .0658 bytes : 232
-
* * * * * * * * * * * * * * * * * * * * * * *
-
Join order [2 ] : EMP [A ] #1 DEPT [B ] #
-
-
* * * * * * * * * * * * * * *
-
Now joining : DEPT [B ] #
-
* * * * * * * * * * * * * * *
-
NL Join
-
Outer table : Card : 12 .10 Cost : 3 .00 Resp : 3 .00 Degree : 1 Bytes : 16
-
Access path analysis for DEPT
-
Inner table : DEPT Alias : B
-
Access Path : TableScan
-
NL Join : Cost : 21 .01 Resp : 21 .01 Degree : 1
-
Cost_io : 21 .00 Cost_cpu : 479934
-
Resp_io : 21 .00 Resp_cpu : 479934
-
Access Path : index (UniqueScan )
-
Index : PK_DEPT
-
resc_io : 1 .00 resc_cpu : 8429
-
ix_sel : 0 .250000 ix_sel_with_filters : 0 .250000
-
NL Join : Cost : 15 .00 Resp : 15 .00 Degree : 1
-
Cost_io : 15 .00 Cost_cpu : 141434
-
Resp_io : 15 .00 Resp_cpu : 141434
-
Access Path : index (AllEqUnique )
-
Index : PK_DEPT
-
resc_io : 1 .00 resc_cpu : 8429
-
ix_sel : 0 .250000 ix_sel_with_filters : 0 .250000
-
NL Join : Cost : 15 .00 Resp : 15 .00 Degree : 1
-
Cost_io : 15 .00 Cost_cpu : 141434
-
Resp_io : 15 .00 Resp_cpu : 141434
-
* * * * * * trying bitmap /domain indexes * * * * * *
-
* * * * * * finished trying bitmap /domain indexes * * * * * *
-
-
Best NL cost : 15 .00
-
resc : 15 .00 resc_io : 15 .00 resc_cpu : 141434
-
resp : 15 .00 resp_io : 15 .00 resc_cpu : 141434
-
Join Card : 8 .065844 = = outer (12 .098765 ) * inner (2 .000000 ) * sel ( .333333 )
-
Join Card - Rounded : 8 Computed : 8 .07
-
Outer table : EMP Alias : A
-
resc : 3 .00 card 12 .10 bytes : 16 deg : 1 resp : 3 .00
-
Inner table : DEPT Alias : B
-
resc : 3 .00 card : 2 .00 bytes : 13 deg : 1 resp : 3 .00
-
using dmeth : 2 #groups : 1
-
SORT ressource Sort statistics
-
Sort width : 396 Area size : 347136 Max Area size : 69624832
-
Degree : 1
-
Blocks to Sort : 1 Row size : 28 Total Rows : 12
-
Initial runs : 1 Merge passes : 0 IO Cost / pass : 0
-
Total IO sort cost : 0 Total CPU sort cost : 32354606
-
Total Temp space used : 0
-
SORT ressource Sort statistics
-
Sort width : 396 Area size : 347136 Max Area size : 69624832
-
Degree : 1
-
Blocks to Sort : 1 Row size : 25 Total Rows : 2
-
Initial runs : 1 Merge passes : 0 IO Cost / pass : 0
-
Total IO sort cost : 0 Total CPU sort cost : 32352758
-
Total Temp space used : 0
-
SM join : Resc : 8 .00 Resp : 8 .00 [multiMatchCost = .00 ]
-
SM Join
-
SM cost : 8 .00
-
resc : 8 .00 resc_io : 6 .00 resc_cpu : 64784289
-
resp : 8 .00 resp_io : 6 .00 resp_cpu : 64784289
-
Outer table : EMP Alias : A
-
resc : 3 .00 card 12 .10 bytes : 16 deg : 1 resp : 3 .00
-
Inner table : DEPT Alias : B
-
resc : 3 .00 card : 2 .00 bytes : 13 deg : 1 resp : 3 .00
-
using dmeth : 2 #groups : 1
-
Cost per ptn : 0 .50 #ptns : 1
-
hash_area : 124 ( max =16999 ) buildfrag : 1 probefrag : 1 ppasses : 1
-
Hash join : Resc : 6 .50 Resp : 6 .50 [multiMatchCost = .00 ]
-
HA Join
-
HA cost : 6 .50
-
resc : 6 .50 resc_io : 6 .00 resc_cpu : 16255859
-
resp : 6 .50 resp_io : 6 .00 resp_cpu : 16255859
-
Join order aborted : cost > best plan cost
-
* * * * * * * * * * * * * * * * * * * * * * *
-
(newjo -stop -1 ) k : , spcnt : , perm :2 , maxperm :2000
-
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Number of join permutations tried : 2
-
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
Consider using bloom filter between B [DEPT ] and A [EMP ]
-
kkoBloomFilter : join (lcdn :2 rcdn :12 jcdn :8 limit :12 )
-
Computing bloom ndv for creator :B [DEPT ] ccdn :2 .0 and user :A [EMP ] ucdn :12 .1
-
kkopqComputeBloomNdv : predicate (bndv :3 ndv :3 ) and (bndv :4 ndv :2 )
-
kkopqComputeBloomNdv : pred cnt :2 ndv :2 reduction :0
-
kkoBloomFilter : join ndv :2 reduction : .165306 (limit : .500000 ) accepted invalidated
-
(newjo - save ) [0 1 ]
-
Trying or -Expansion on query block SEL$1 ( # )
-
Transfer Optimizer annotations for query block SEL$1 ( # )
-
id =0 frofand predicate = B . DNAME = 'RESEARCH' OR B . DNAME = 'SALES'
-
id =0 frofkksm [i ] (sort -merge /hash ) predicate = "A" . "DEPTNO" = "B" . "DEPTNO"
-
id =0 frosand (sort -merge /hash ) predicate = "A" . "DEPTNO" = "B" . "DEPTNO"
-
id =0 frofand predicate = "A" . "SAL" >1500
-
Final cost for query block SEL$1 ( # ) - All Rows Plan :
-
Best join order : 1
-
Cost : 6 .0018 Degree : 1 Card : 8 .0000 Bytes : 232
-
Resc : 6 .0018 Resc_io : 5 .0000 Resc_cpu : 32410967
-
Resp : 6 .0018 Resp_io : 5 .0000 Resc_cpu : 32410967
-
kkoqbc -subheap ( delete addr =0x88fb0c , in -use =58204 , alloc =75528 )
-
kkoqbc - end :
-
:
-
call ( in -use =14320 , alloc =101236 ) , compile ( in -use =57944 , alloc =59416 ) , execution ( in -use =2124 , alloc =4060 )
-
-
kkoqbc : finish optimizing query block SEL$1 ( # )
-
apadrv - end
-
:
-
call ( in -use =14320 , alloc =101236 ) , compile ( in -use =58580 , alloc =59416 ) , execution ( in -use =2124 , alloc =4060 )
-
-
-
Starting SQL statement dump
-
-
user_id =84 user_name =SCOTT module =SQL *Plus action =
-
sql_id =5z7wqfry426ch plan_hash_value =844388907 problem_type =3
-
----- Current SQL Statement for this session (sql_id=5z7wqfry426ch) -----
-
select /* Sample 2^^*/ a .ename from emp a , dept b
-
where (a .deptno = b .deptno
-
and a .sal >1500
-
and b .dname = 'SALES' )
-
or (
-
a .deptno = b .deptno
-
and a .sal > 1500
-
and b .dname = 'RESEARCH'
-
)
-
sql_text_length =180
-
sql = select /* Sample 2^^*/ a .ename from emp a , dept b
-
where (a .deptno = b .deptno
-
and a .sal >1500
-
and b .dname = 'SALES' )
-
or (
-
a .deptno = b .deptno
-
and a .sal > 1500
-
and b .dname = 'RESEARCH'
-
)
-
----- Explain Plan Dump -----
-
----- Plan Table -----
-
-
= = = = = = = = = = = =
-
Plan Table
-
= = = = = = = = = = = =
-
------------------------------------------------+-----------------------------------+
-
| Id | Operation | Name | Rows | Bytes | Cost | Time |
-
------------------------------------------------+-----------------------------------+
-
| 0 | SELECT STATEMENT | | | | 6 | |
-
| 1 | MERGE JOIN | | 8 | 232 | 6 | 00 :00 :01 |
-
| 2 | TABLE ACCESS BY INDEX ROWID | DEPT | 2 | 26 | 2 | 00 :00 :01 |
-
| 3 | INDEX FULL SCAN | PK_DEPT | 4 | | 1 | 00 :00 :01 |
-
| 4 | SORT JOIN | | 12 | 192 | 4 | 00 :00 :01 |
-
| 5 | TABLE ACCESS FULL | EMP | 12 | 192 | 3 | 00 :00 :01 |
-
------------------------------------------------+-----------------------------------+
-
Predicate Information :
-
----------------------
-
2 - filter ( ( B . DNAME = RESEARCH OR B . DNAME = 'SALES' ) )
-
4 - access ( A . DEPTNO = B . DEPTNO ) ----table access full 没有顺序所以 sort join 排序这个步骤在内存中执行
-
4 - filter ( A . DEPTNO = B . DEPTNO )
-
5 - filter ( A . SAL >1500 )
-
-
Content of other_xml column
-
= = = = = = = = = = = = = = = = = = = = = = = = = = =
-
db_version : 11 .2 . .1
-
parse_schema : SCOTT
-
plan_hash : 844388907
-
plan_hash_2 : 1522826797
-
Outline Data :
-
/*+
-
BEGIN_OUTLINE_DATA
-
IGNORE_OPTIM_EMBEDDED_HINTS
-
OPTIMIZER_FEATURES_ENABLE(\'11.2.0.1\')
-
DB_VERSION(\'11.2.0.1\')
-
ALL_ROWS
-
OUTLINE_LEAF(@\"SEL$1\")
-
INDEX(@\"SEL$1\" \"B\"@\"SEL$1\" (\"DEPT\".\"DEPTNO\"))
-
FULL(@\"SEL$1\" \"A\"@\"SEL$1\")
-
LEADING(@\"SEL$1\" \"B\"@\"SEL$1\" \"A\"@\"SEL$1\")
-
USE_MERGE(@\"SEL$1\" \"A\"@\"SEL$1\")
-
PX_JOIN_FILTER(@\"SEL$1\" \"A\"@\"SEL$1\")
-
END_OUTLINE_DATA
-
*/
-
-
Optimizer state dump :
-
Compilation Environment Dump
-
optimizer_mode_hinted = false
-
optimizer_features_hinted = 0 . .
-
parallel_execution_enabled = true
-
parallel_query_forced_dop = 0
-
parallel_dml_forced_dop = 0
-
parallel_ddl_forced_degree = 0
-
parallel_ddl_forced_instances = 0
-
_query_rewrite_fudge = 90
-
optimizer_features_enable = 11 .2 . .1
-
_optimizer_search_limit = 5
-
cpu_count = 1
-
active_instance_count = 2
-
parallel_threads_per_cpu = 2
-
hash_area_size = 131072
-
bitmap_merge_area_size = 1048576
-
sort_area_size = 65536
-
sort_area_retained_size = 0
-
_sort_elimination_cost_ratio = 0
-
_optimizer_block_size = 8192
-
_sort_multiblock_read_count = 2
-
_hash_multiblock_io_count = 0
-
_db_file_optimizer_read_count = 8
-
_optimizer_max_permutations = 2000
-
pga_aggregate_target = 339968 KB
-
_pga_max_size = 204800 KB
-
_query_rewrite_maxdisjunct = 257
-
_smm_auto_min_io_size = 56 KB
-
_smm_auto_max_io_size = 248 KB
-
_smm_min_size = 339 KB
-
_smm_max_size = 67993 KB
-
_smm_px_max_size = 169984 KB
-
_cpu_to_io = 0
-
_optimizer_undo_cost_change = 11 .2 . .1
-
parallel_query_mode = enabled
-
parallel_dml_mode = disabled
-
parallel_ddl_mode = enabled
-
optimizer_mode = all_rows
-
sqlstat_enabled = false
-
_optimizer_percent_parallel = 101
-
_always_anti_join = choose
-
_always_semi_join = choose
-
_optimizer_mode_force = true
-
_partition_view_enabled = true
-
_always_star_transformation = false
-
_query_rewrite_or_error = false
-
_hash_join_enabled = true
-
cursor_sharing = exact
-
_b_tree_bitmap_plans = true
-
star_transformation_enabled = false
-
_optimizer_cost_model = choose
-
_new_sort_cost_estimate = true
-
_complex_view_merging = true
-
_unnest_subquery = true
-
_eliminate_common_subexpr = true
-
_pred_move_around = true
-
_convert_set_to_join = false
-
_push_join_predicate = true
-
_push_join_union_view = true
-
_fast_full_scan_enabled = true
-
_optim_enhance_nnull_detection = true
-
_parallel_broadcast_enabled = true
-
_px_broadcast_fudge_factor = 100
-
_ordered_nested_loop = true
-
_no_or_expansion = false
-
optimizer_index_cost_adj = 100
-
optimizer_index_caching = 0
-
_system_index_caching = 0
-
_disable_datalayer_sampling = false
-
query_rewrite_enabled = true
-
query_rewrite_integrity = enforced
-
_query_cost_rewrite = true
-
_query_rewrite_2 = true
-
_query_rewrite_1 = true
-
_query_rewrite_expression = true
-
_query_rewrite_jgmigrate = true
-
_query_rewrite_fpc = true
-
_query_rewrite_drj = true
-
_full_pwise_join_enabled = true
-
_partial_pwise_join_enabled = true
-
_left_nested_loops_random = true
-
_improved_row_length_enabled = true
-
_index_join_enabled = true
-
_enable_type_dep_selectivity = true
-
_improved_outerjoin_card = true
-
_optimizer_adjust_for_nulls = true
-
_optimizer_degree = 0
-
_use_column_stats_for_function = true
-
_subquery_pruning_enabled = true
-
_subquery_pruning_mv_enabled = false
-
_or_expand_nvl_predicate = true
-
_like_with_bind_as_equality = false
-
_table_scan_cost_plus_one = true
-
_cost_equality_semi_join = true
-
_default_non_equality_sel_check = true
-
_new_initial_join_orders = true
-
_oneside_colstat_for_equijoins = true
-
_optim_peek_user_binds = true
-
_minimal_stats_aggregation = true
-
_force_temptables_for_gsets = false
-
workarea_size_policy = auto
-
_smm_auto_cost_enabled = true
-
_gs_anti_semi_join_allowed = true
-
_optim_new_default_join_sel = true
-
optimizer_dynamic_sampling = 2
-
_pre_rewrite_push_pred = true
-
_optimizer_new_join_card_computation = true
-
_union_rewrite_for_gs = yes_gset_mvs
-
_generalized_pruning_enabled = true
-
_optim_adjust_for_part_skews = true
-
_force_datefold_trunc = false
-
statistics_level = typical
-
_optimizer_system_stats_usage = true
-
skip_unusable_indexes = true
-
_remove_aggr_subquery = true
-
_optimizer_push_down_distinct = 0
-
_dml_monitoring_enabled = true
-
_optimizer_undo_changes = false
-
_predicate_elimination_enabled = true
-
_nested_loop_fudge = 100
-
_project_view_columns = true
-
_local_communication_costing_enabled = true
-
_local_communication_ratio = 50
-
_query_rewrite_vop_cleanup = true
-
_slave_mapping_enabled = true
-
_optimizer_cost_based_transformation = linear
-
_optimizer_mjc_enabled = true
-
_right_outer_hash_enable = true
-
_spr_push_pred_refspr = true
-
_optimizer_cache_stats = false
-
_optimizer_cbqt_factor = 50
-
_optimizer_squ_bottomup = true
-
_fic_area_size = 131072
-
_optimizer_skip_scan_enabled = true
-
_optimizer_cost_filter_pred = false
-
_optimizer_sortmerge_join_enabled = true
-
_optimizer_join_sel_sanity_check = true
-
_mmv_query_rewrite_enabled = true
-
_bt_mmv_query_rewrite_enabled = true
-
_add_stale_mv_to_dependency_list = true
-
_distinct_view_unnesting = false
-
_optimizer_dim_subq_join_sel = true
-
_optimizer_disable_strans_sanity_checks = 0
-
_optimizer_compute_index_stats = true
-
_push_join_union_view2 = true
-
_optimizer_ignore_hints = false
-
_optimizer_random_plan = 0
-
_query_rewrite_setopgrw_enable = true
-
_optimizer_correct_sq_selectivity = true
-
_disable_function_based_index = false
-
_optimizer_join_order_control = 3
-
_optimizer_cartesian_enabled = true
-
_optimizer_starplan_enabled = true
-
_extended_pruning_enabled = true
-
_optimizer_push_pred_cost_based = true
-
_optimizer_null_aware_antijoin = true
-
_optimizer_extend_jppd_view_types = true
-
_sql_model_unfold_forloops = run_time
-
_enable_dml_lock_escalation = false
-
_bloom_filter_enabled = true
-
_update_bji_ipdml_enabled = 0
-
_optimizer_extended_cursor_sharing = udo
-
_dm_max_shared_pool_pct = 1
-
_optimizer_cost_hjsmj_multimatch = true
-
_optimizer_transitivity_retain = true
-
_px_pwg_enabled = true
-
optimizer_secure_view_merging = true
-
_optimizer_join_elimination_enabled = true
-
flashback_table_rpi = non_fbt
-
_optimizer_cbqt_no_size_restriction = true
-
_optimizer_enhanced_filter_push = true
-
_optimizer_filter_pred_pullup = true
-
_rowsrc_trace_level = 0
-
_simple_view_merging = true
-
_optimizer_rownum_pred_based_fkr = true
-
_optimizer_better_inlist_costing = all
-
_optimizer_self_induced_cache_cost = false
-
_optimizer_min_cache_blocks = 10
-
_optimizer_or_expansion = depth
-
_optimizer_order_by_elimination_enabled = true
-
_optimizer_outer_to_anti_enabled = true
-
_selfjoin_mv_duplicates = true
-
_dimension_skip_null = true
-
_force_rewrite_enable = false
-
_optimizer_star_tran_in_with_clause = true
-
_optimizer_complex_pred_selectivity = true
-
_optimizer_connect_by_cost_based = true
-
_gby_hash_aggregation_enabled = true
-
_globalindex_pnum_filter_enabled = true
-
_px_minus_intersect = true
-
_fix_control_key = 0
-
_force_slave_mapping_intra_part_loads = false
-
_force_tmp_segment_loads = false
-
_query_mmvrewrite_maxpreds = 10
-
_query_mmvrewrite_maxintervals = 5
-
_query_mmvrewrite_maxinlists = 5
-
_query_mmvrewrite_maxdmaps = 10
-
_query_mmvrewrite_maxcmaps = 20
-
_query_mmvrewrite_maxregperm = 512
-
_query_mmvrewrite_maxmergedcmaps = 50
-
_query_mmvrewrite_maxqryinlistvals = 500
-
_disable_parallel_conventional_load = false
-
_trace_virtual_columns = false
-
_replace_virtual_columns = true
-
_virtual_column_overload_allowed = true
-
_kdt_buffering = true
-
_first_k_rows_dynamic_proration = true
-
_optimizer_sortmerge_join_inequality = true
-
_optimizer_aw_stats_enabled = true
-
_bloom_pruning_enabled = true
-
result_cache_mode = MANUAL
-
_px_ual_serial_input = true
-
_optimizer_skip_scan_guess = false
-
_enable_row_shipping = true
-
_row_shipping_threshold = 80
-
_row_shipping_explain = false
-
transaction_isolation_level = read_commited
-
_optimizer_distinct_elimination = true
-
_optimizer_multi_level_push_pred = true
-
_optimizer_group_by_placement = true
-
_optimizer_rownum_bind_default = 10
-
_enable_query_rewrite_on_remote_objs = true
-
_optimizer_extended_cursor_sharing_rel = simple
-
_optimizer_adaptive_cursor_sharing = true
-
_direct_path_insert_features = 0
-
_optimizer_improve_selectivity = true
-
optimizer_use_pending_statistics = false
-
_optimizer_enable_density_improvements = true
-
_optimizer_aw_join_push_enabled = true
-
_optimizer_connect_by_combine_sw = true
-
_enable_pmo_ctas = 0
-
_optimizer_native_full_outer_join = force
-
_bloom_predicate_enabled = true
-
_optimizer_enable_extended_stats = true
-
_is_lock_table_for_ddl_wait_lock = 0
-
_pivot_implementation_method = choose
-
optimizer_capture_sql_plan_baselines = false
-
optimizer_use_sql_plan_baselines = true
-
_optimizer_star_trans_min_cost = 0
-
_optimizer_star_trans_min_ratio = 0
-
_with_subquery = OPTIMIZER
-
_optimizer_fkr_index_cost_bias = 10
-
_optimizer_use_subheap = true
-
parallel_degree_policy = manual
-
parallel_degree = 0
-
parallel_min_time_threshold = 10
-
_parallel_time_unit = 10
-
_optimizer_or_expansion_subheap = true
-
_optimizer_free_transformation_heap = true
-
_optimizer_reuse_cost_annotations = true
-
_result_cache_auto_size_threshold = 100
-
_result_cache_auto_time_threshold = 1000
-
_optimizer_nested_rollup_for_gset = 100
-
_nlj_batching_enabled = 1
-
parallel_query_default_dop = 0
-
is_recur_flags = 0
-
optimizer_use_invisible_indexes = false
-
flashback_data_archive_internal_cursor = 0
-
_optimizer_extended_stats_usage_control = 224
-
_parallel_syspls_obey_force = true
-
cell_offload_processing = true
-
_rdbms_internal_fplib_enabled = false
-
db_file_multiblock_read_count = 79
-
_bloom_folding_enabled = true
-
_mv_generalized_oj_refresh_opt = true
-
cell_offload_compaction = ADAPTIVE
-
parallel_degree_limit = 65535
-
parallel_force_local = false
-
parallel_max_degree = 4
-
total_cpu_count = 2
-
cell_offload_plan_display = AUTO
-
_optimizer_coalesce_subqueries = true
-
_optimizer_fast_pred_transitivity = true
-
_optimizer_fast_access_pred_analysis = true
-
_optimizer_unnest_disjunctive_subq = true
-
_optimizer_unnest_corr_set_subq = true
-
_optimizer_distinct_agg_transform = true
-
_aggregation_optimization_settings = 0
-
_optimizer_connect_by_elim_dups = true
-
_optimizer_eliminate_filtering_join = true
-
_connect_by_use_union_all = true
-
dst_upgrade_insert_conv = true
-
advanced_queuing_internal_cursor = 0
-
_optimizer_unnest_all_subqueries = true
-
_bloom_predicate_pushdown_to_storage = true
-
_bloom_vector_elements = 0
-
_bloom_pushing_max = 524288
-
parallel_autodop = 0
-
parallel_ddldml = 0
-
_parallel_cluster_cache_policy = adaptive
-
_parallel_scalability = 50
-
iot_internal_cursor = 0
-
_optimizer_instance_count = 0
-
_optimizer_connect_by_cb_whr_only = false
-
_suppress_scn_chk_for_cqn = nosuppress_1466
-
_optimizer_join_factorization = true
-
_optimizer_use_cbqt_star_transformation = true
-
_optimizer_table_expansion = true
-
_and_pruning_enabled = true
-
_deferred_constant_folding_mode = DEFAULT
-
_optimizer_distinct_placement = true
-
partition_pruning_internal_cursor = 0
-
parallel_hinted = none
-
_sql_compatibility = 0
-
_optimizer_use_feedback = true
-
_optimizer_try_st_before_jppd = true
-
Bug Fix Control Environment
-
fix 3834770 = 1
-
fix 3746511 = enabled
-
fix 4519016 = enabled
-
fix 2320291 = enabled
-
fix 4666174 = enabled
-
fix 4567767 = enabled
-
fix 4556762 = 15
-
-
Query Block Registry :
-
SEL$1 0x883604 (PARSER ) [ FINAL ]
-
-
:
-
call ( in -use =21064 , alloc =101236 ) , compile ( in -use =80828 , alloc =141580 ) , execution ( in -use =8172 , alloc =12212 )
-
-
End of Optimizer State Dump
-
Dumping Hints
-
= = = = = = = = = = = = =
-
= = = = = = = = = = = = = = = = = = = = = = END SQL Statement Dump = = = = = = = = = = = = = = = = = = = = = =
-
------------------------------------------------+-----------------------------------+
-
| Id | Operation | Name | Rows | Bytes | Cost | Time |
-
------------------------------------------------+-----------------------------------+
-
| 0 | SELECT STATEMENT | | | | 6 | |
-
| 1 | MERGE JOIN | | 8 | 232 | 6 | 00 :00 :01 |
-
| 2 | TABLE ACCESS BY INDEX ROWID | DEPT | 2 | 26 | 2 | 00 :00 :01 |
-
| 3 | INDEX FULL SCAN | PK_DEPT | 4 | | 1 | 00 :00 :01 |
-
| 4 | SORT JOIN | | 12 | 192 | 4 | 00 :00 :01 |
-
| 5 | TABLE ACCESS FULL | EMP | 12 | 192 | 3 | 00 :00 :01 |
-
------------------------------------------------+-----------------------------------+
Predicate Information:
----------------------
2 - filter(("B"."DNAME"='RESEARCH' OR "B"."DNAME"='SALES'))
4 - access("A"."DEPTNO"="B"."DEPTNO")
4 - filter("A"."DEPTNO"="B"."DEPTNO")
5 - filter("A"."SAL">1500)
语句的执行计划走的是sort,
但是11.2.0.3走的是hash,不同版本解析器执行计划可能不同
bloom一个行,一个位。
0101000100010000000000010001000010000010000111
0110000010010000000010000000010000000000000110
符合条件的变成1,把两个字节序做个and,都是1说明能连取出来,这个动作叫boom
_bloom_filter_enabled