OPTIMIZER_FEATURES_ENABLE 11.2.0.3
HelloI find the following reference ([http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams166.htm#REFRN10141]) but no information related to the 11.2.0.3.
Any information is appreciated.
Kind regards
Guillaume
I don't think you will find a document that reviews the optimizer changes between 11.2.0.1 and 11.2.0.3 - pl log an SR with Support to see if he can get this information
HTH
Srini
Tags: Database
Similar Questions
-
low how can I put the optimizer_features_enable
Hello
I will perform the installation of a new instance of Oracle 11 g to replace an instance of 10g. optimizer instance 10g version is 8.1.7.
Will I have the same behavior with my new instance 11g (version in optimizer is 8.1.7)? Is it possible to reduce the version of optimizer as such?
Any responses appreciated.
Donatien
Yes, according to the docs, you can go as low as 8.0.0:
But why Devil would you want that?
-
optimizer_features_enable
I put optimizer_features_enable variable to a value, that I don't remember now. I'm working on Oracle 10.2.0.5. Is there a way to read the current value of this variable?Question,
view the optimizer_features setting
Aman...
-
optimizer_features_enable question
How I discovered what level the optimizer is running under? for example, if I ran the following command how to check that it is running actually less ' 11.1.0.7"?
optimizer_features_enable = '11.1.0.7';SQL> show parameter optimizer NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ optimizer_capture_sql_plan_baselines boolean FALSE optimizer_dynamic_sampling integer 2 optimizer_features_enable string 11.2.0.1 optimizer_index_caching integer 0 optimizer_index_cost_adj integer 100 optimizer_mode string ALL_ROWS optimizer_secure_view_merging boolean TRUE optimizer_use_invisible_indexes boolean FALSE optimizer_use_pending_statistics boolean FALSE optimizer_use_sql_plan_baselines boolean TRUE
-
WITH and optimizer_features_enable
I recently updated my 10.1.0.5 db to
Now I have this performance issue.Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ON Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Fire-V440
The query:
is slow (> 10 minutes), but the versionwith B as (...) select .. from A, B where ...
is fast (2 seconds).select .. from A, (...) B where ...
After changing the 11.1.0.7 optimizer_features_enable back to 10.1.0.5 both queries are fast...
Is this a known bug? Y at - it a patch for this strange behavior?
RiccardoSearch Metalink and there seems to be a bug in optimizer (9220054) linked to the clause on this version of the database.
-
What should the setting be set to 11.2.0.4.7 for a DW?
In my opinion, you should assign the highest value possible (IE, your release), unless you have a not proven why do.
Of course, in a world ideal, you would go through the company to first test the performance and tuning all SQLs where performance has regressed, but you're not going to do that. So trust Uncle Oracle.
-
Hi Experts,
I am new to Oracle. Ask for your help to fix the performance of a query of insertion problem.
I have an insert query that is go search for records of the partitioned table.
Background: the user indicates that the query was running in 30 minutes to 10 G. The database is upgraded to 12 by one of my colleague. Now the query works continuously for hours, but no result. Check the settings and SGA is 9 GB, Windows - 4 GB. DB block size is 8192, DB Multiblock read file Count is 128. Overall target of PGA is 2457M.
The parameters are given below
VALUE OF TYPE NAME
------------------------------------ ----------- ----------
DBFIPS_140 boolean FALSE
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
whole active_instance_count
aq_tm_processes integer 1
ARCHIVE_LAG_TARGET integer 0
asm_diskgroups chain
asm_diskstring chain
asm_power_limit integer 1
asm_preferred_read_failure_groups string
audit_file_dest string C:\APP\ADM
audit_sys_operations Boolean TRUEAUDIT_TRAIL DB string
awr_snapshot_time_offset integer 0
background_core_dump partial string
background_dump_dest string C:\APP\PRO
\RDBMS\TRA
BACKUP_TAPE_IO_SLAVES boolean FALSE
bitmap_merge_area_size integer 1048576
blank_trimming boolean FALSE
buffer_pool_keep string
buffer_pool_recycle string
cell_offload_compaction ADAPTIVE channel
cell_offload_decryption Boolean TRUE
cell_offload_parameters string
cell_offload_plan_display string AUTO
cell_offload_processing Boolean TRUE
cell_offloadgroup_name string
whole circuits
whole big client_result_cache_lag 3000
client_result_cache_size big integer 0
clonedb boolean FALSE
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects chain
commit_logging string
commit_point_strength integer 1
commit_wait string
string commit_write
common_user_prefix string C#.
compatible string 12.1.0.2.0
connection_brokers string ((TYPE = DED
((TYPE = EM
control_file_record_keep_time integer 7
control_files string G:\ORACLE\TROL01. CTL
FAST_RECOV
NTROL02. CT
control_management_pack_access string diagnostic
core_dump_dest string C:\app\dia
bal12\cdum
cpu_count integer 4
create_bitmap_area_size integer 8388608
create_stored_outlines string
cursor_bind_capture_destination memory of the string + tell
CURSOR_SHARING EXACT stringcursor_space_for_time boolean FALSE
db_16k_cache_size big integer 0
db_2k_cache_size big integer 0
db_32k_cache_size big integer 0
db_4k_cache_size big integer 0
db_8k_cache_size big integer 0
db_big_table_cache_percent_target string 0
db_block_buffers integer 0
db_block_checking FALSE string
db_block_checksum string TYPICAL
Whole DB_BLOCK_SIZE 8192db_cache_advice string WE
db_cache_size large integer 0
db_create_file_dest chain
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
db_domain chain
db_file_multiblock_read_count integer 128
db_file_name_convert chainDB_FILES integer 200
db_flash_cache_file string
db_flash_cache_size big integer 0
db_flashback_retention_target around 1440
chain of db_index_compression_inheritance NONE
DB_KEEP_CACHE_SIZE big integer 0
chain of db_lost_write_protect NONE
db_name string ORCL
db_performance_profile string
db_recovery_file_dest string G:\Oracle\
y_Area
whole large db_recovery_file_dest_size 12840M
db_recycle_cache_size large integer 0
db_securefile string PREFERRED
channel db_ultra_safe
db_unique_name string ORCL
db_unrecoverable_scn_tracking Boolean TRUE
db_writer_processes integer 1
dbwr_io_slaves integer 0
DDL_LOCK_TIMEOUT integer 0
deferred_segment_creation Boolean TRUE
dg_broker_config_file1 string C:\APP\PRO
\DATABASE\
dg_broker_config_file2 string C:\APP\PRO
\DATABASE\
dg_broker_start boolean FALSE
diagnostic_dest channel directory
disk_asynch_io Boolean TRUE
dispatchers (PROTOCOL = string
12XDB)
distributed_lock_timeout integer 60
dml_locks whole 2076
whole dnfs_batch_size 4096dst_upgrade_insert_conv Boolean TRUE
enable_ddl_logging boolean FALSE
enable_goldengate_replication boolean FALSE
enable_pluggable_database boolean FALSE
event string
exclude_seed_cdb_view Boolean TRUE
fal_client chain
fal_server chain
FAST_START_IO_TARGET integer 0
fast_start_mttr_target integer 0
fast_start_parallel_rollback string LOW
file_mapping boolean FALSE
fileio_network_adapters string
filesystemio_options chain
fixed_date chain
gcs_server_processes integer 0
global_context_pool_size string
global_names boolean FALSE
global_txn_processes integer 1
hash_area_size integer 131072
channel heat_map
hi_shared_memory_address integer 0hs_autoregister Boolean TRUE
iFile file
inmemory_clause_default string
inmemory_force string by DEFAULT
inmemory_max_populate_servers integer 0
inmemory_query string ENABLE
inmemory_size big integer 0
inmemory_trickle_repopulate_servers_ integer 1
percent
instance_groups string
instance_name string ORCL
instance_number integer 0
instance_type string RDBMS
instant_restore boolean FALSE
java_jit_enabled Boolean TRUE
java_max_sessionspace_size integer 0
JAVA_POOL_SIZE large integer 0
java_restrict string no
java_soft_sessionspace_limit integer 0
JOB_QUEUE_PROCESSES around 1000
LARGE_POOL_SIZE large integer 0
ldap_directory_access string NONE
ldap_directory_sysauth string no.
license_max_sessions integer 0
license_max_users integer 0
license_sessions_warning integer 0
listener_networks string
LOCAL_LISTENER (ADDRESS = string
= i184borac
(NET) (PORT =
lock_name_space string
lock_sga boolean FALSE
log_archive_config string
Log_archive_dest chain
Log_archive_dest_1 chain
LOG_ARCHIVE_DEST_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
log_archive_dest_19 string
LOG_ARCHIVE_DEST_2 string
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
log_archive_dest_3 string
log_archive_dest_30 string
log_archive_dest_31 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
allow the chain of log_archive_dest_state_1
allow the chain of log_archive_dest_state_10
allow the chain of log_archive_dest_state_11
allow the chain of log_archive_dest_state_12
allow the chain of log_archive_dest_state_13
allow the chain of log_archive_dest_state_14
allow the chain of log_archive_dest_state_15
allow the chain of log_archive_dest_state_16
allow the chain of log_archive_dest_state_17
allow the chain of log_archive_dest_state_18
allow the chain of log_archive_dest_state_19
allow the chain of LOG_ARCHIVE_DEST_STATE_2allow the chain of log_archive_dest_state_20
allow the chain of log_archive_dest_state_21
allow the chain of log_archive_dest_state_22
allow the chain of log_archive_dest_state_23
allow the chain of log_archive_dest_state_24
allow the chain of log_archive_dest_state_25
allow the chain of log_archive_dest_state_26
allow the chain of log_archive_dest_state_27
allow the chain of log_archive_dest_state_28
allow the chain of log_archive_dest_state_29
allow the chain of log_archive_dest_state_3allow the chain of log_archive_dest_state_30
allow the chain of log_archive_dest_state_31
allow the chain of log_archive_dest_state_4
allow the chain of log_archive_dest_state_5
allow the chain of log_archive_dest_state_6
allow the chain of log_archive_dest_state_7
allow the chain of log_archive_dest_state_8
allow the chain of log_archive_dest_state_9
log_archive_duplex_dest string
log_archive_format string ARC%S_%R.%
log_archive_max_processes integer 4log_archive_min_succeed_dest integer 1
log_archive_start Boolean TRUE
log_archive_trace integer 0
whole very large log_buffer 28784K
log_checkpoint_interval integer 0
log_checkpoint_timeout around 1800
log_checkpoints_to_alert boolean FALSE
log_file_name_convert chain
whole MAX_DISPATCHERS
max_dump_file_size unlimited string
max_enabled_roles integer 150
whole max_shared_servers
max_string_size string STANDARD
memory_max_target big integer 0
memory_target large integer 0
NLS_CALENDAR string GREGORIAN
nls_comp BINARY string
nls_currency channel u
string of NLS_DATE_FORMAT DD-MON-RR
nls_date_language channel ENGLISH
string nls_dual_currency C
nls_iso_currency string UNITED KINnls_language channel ENGLISH
nls_length_semantics string OCTET
string nls_nchar_conv_excp FALSE
nls_numeric_characters chain.,.
nls_sort BINARY string
nls_territory string UNITED KIN
nls_time_format HH24.MI string. SS
nls_time_tz_format HH24.MI string. SS
chain of NLS_TIMESTAMP_FORMAT DD-MON-RR
NLS_TIMESTAMP_TZ_FORMAT string DD-MON-RR
noncdb_compatible boolean FALSE
object_cache_max_size_percent integer 10
object_cache_optimal_size integer 102400
olap_page_pool_size big integer 0
open_cursors integer 300
Open_links integer 4
open_links_per_instance integer 4
optimizer_adaptive_features Boolean TRUE
optimizer_adaptive_reporting_only boolean FALSE
OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 12.1.0.2optimizer_index_caching integer 0
OPTIMIZER_INDEX_COST_ADJ integer 100
optimizer_inmemory_aware Boolean TRUE
the string ALL_ROWS optimizer_mode
optimizer_secure_view_merging Boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines Boolean TRUE
OPS os_authent_prefix string $
OS_ROLES boolean FALSE
parallel_adaptive_multi_user Boolean TRUE
parallel_automatic_tuning boolean FALSE
parallel_degree_level integer 100
parallel_degree_limit string CPU
parallel_degree_policy chain MANUAL
parallel_execution_message_size integer 16384
parallel_force_local boolean FALSE
parallel_instance_group string
parallel_io_cap_enabled boolean FALSE
PARALLEL_MAX_SERVERS integer 160
parallel_min_percent integer 0
parallel_min_servers integer 16parallel_min_time_threshold string AUTO
parallel_server boolean FALSE
parallel_server_instances integer 1
parallel_servers_target integer 64
parallel_threads_per_cpu integer 2
pdb_file_name_convert string
pdb_lockdown string
pdb_os_credential string
permit_92_wrap_format Boolean TRUE
pga_aggregate_limit great whole 4914M
whole large pga_aggregate_target 2457M-
Plscope_settings string IDENTIFIER
plsql_ccflags string
plsql_code_type chain INTERPRETER
plsql_debug boolean FALSE
plsql_optimize_level integer 2
plsql_v2_compatibility boolean FALSE
plsql_warnings DISABLE channel: AL
PRE_PAGE_SGA Boolean TRUE
whole process 300
processor_group_name string
query_rewrite_enabled string TRUE
applied query_rewrite_integrity chain
rdbms_server_dn chain
read_only_open_delayed boolean FALSE
recovery_parallelism integer 0
Recyclebin string on
redo_transport_user string
remote_dependencies_mode string TIMESTAMP
remote_listener chain
Remote_login_passwordfile string EXCLUSIVE
REMOTE_OS_AUTHENT boolean FALSE
remote_os_roles boolean FALSEreplication_dependency_tracking Boolean TRUE
resource_limit Boolean TRUE
resource_manager_cpu_allocation integer 4
resource_manager_plan chain
result_cache_max_result integer 5
whole big result_cache_max_size K 46208
result_cache_mode chain MANUAL
result_cache_remote_expiration integer 0
resumable_timeout integer 0
rollback_segments chain
SEC_CASE_SENSITIVE_LOGON Boolean TRUEsec_max_failed_login_attempts integer 3
string sec_protocol_error_further_action (DROP, 3)
sec_protocol_error_trace_action string PATH
sec_return_server_release_banner boolean FALSE
disable the serial_reuse chain
service name string ORCL
session_cached_cursors integer 50
session_max_open_files integer 10
entire sessions 472
Whole large SGA_MAX_SIZE M 9024
Whole large SGA_TARGET M 9024
shadow_core_dump string no
shared_memory_address integer 0
SHARED_POOL_RESERVED_SIZE large integer 70464307
shared_pool_size large integer 0
whole shared_server_sessions
SHARED_SERVERS integer 1
skip_unusable_indexes Boolean TRUE
smtp_out_server chain
sort_area_retained_size integer 0
sort_area_size integer 65536
spatial_vector_acceleration boolean FALSE
SPFile string C:\APP\PRO
\DATABASE\
sql92_security boolean FALSE
SQL_Trace boolean FALSE
sqltune_category string by DEFAULT
standby_archive_dest channel % ORACLE_HO
standby_file_management string MANUAL
star_transformation_enabled string TRUE
statistics_level string TYPICAL
STREAMS_POOL_SIZE big integer 0
tape_asynch_io Boolean TRUEtemp_undo_enabled boolean FALSE
entire thread 0
threaded_execution boolean FALSE
timed_os_statistics integer 0
TIMED_STATISTICS Boolean TRUE
trace_enabled Boolean TRUE
tracefile_identifier chain
whole of transactions 519
transactions_per_rollback_segment integer 5
UNDO_MANAGEMENT string AUTO
UNDO_RETENTION integer 900undo_tablespace string UNDOTBS1
unified_audit_sga_queue_size integer 1048576
use_dedicated_broker boolean FALSE
use_indirect_data_buffers boolean FALSE
use_large_pages string TRUE
user_dump_dest string C:\APP\PRO
\RDBMS\TRA
UTL_FILE_DIR chain
workarea_size_policy string AUTO
xml_db_events string enableThanks in advance
Firstly, thank you for posting the 10g implementation plan, which was one of the key things that we were missing.
Second, you realize that you have completely different execution plans, so you can expect different behavior on each system.
Your package of 10g has a total cost of 23 959 while your plan of 12 c has a cost of 95 373 which is almost 4 times more. All things being equal, cost is supposed to relate directly to the time spent, so I expect the 12 c plan to take much more time to run.
From what I can see the 10g plan begins with a scan of full table on DEALERS, and then a full scan on SCARF_VEHICLE_EXCLUSIONS table, and then a full scan on CBX_tlemsani_2000tje table, and then a full scan on CLAIM_FACTS table. The first three of these analyses tables have a very low cost (2 each), while the last has a huge cost of 172K. Yet once again, the first three scans produce very few lines in 10g, less than 1,000 lines each, while the last product table scan 454 K lines.
It also looks that something has gone wrong in the 10g optimizer plan - maybe a bug, which I consider that Jonathan Lewis commented. Despite the full table scan with a cost of 172 K, NESTED LOOPS it is part of the only has a cost of 23 949 or 24 K. If the math is not in terms of 10g. In other words, maybe it's not really optimal plan because 10g optimizer may have got its sums wrong and 12 c might make his right to the money. But luckily this 'imperfect' 10g plan happens to run fairly fast for one reason or another.
The plan of 12 starts with similar table scans but in a different order. The main difference is that instead of a full table on CLAIM_FACTS scan, it did an analysis of index on CLAIM_FACTS_AK9 beach at the price of 95 366. It is the only main component of the final total cost of 95 373.
Suggestions for what to do? It is difficult, because there is clearly an anomaly in the system of 10g to have produced the particular execution plan that he uses. And there is other information that you have not provided - see later.
You can try and force a scan of full table on CLAIM_FACTS by adding a suitable example suspicion "select / * + full (CF) * / cf.vehicle_chass_no...". "However, the tips are very difficult to use and does not, guarantee that you will get the desired end result. So be careful. For the essay on 12 c, it may be worth trying just to see what happens and what produces the execution plan looks like. But I would not use such a simple, unique tip in a production system for a variety of reasons. For testing only it might help to see if you can force the full table on CLAIM_FACTS scan as in 10g, and if the performance that results is the same.
The two plans are parallel ones, which means that the query is broken down into separate, independent steps and several steps that are executed at the same time, i.e. several CPUS will be used, and there will be several readings of the disc at the same time. (It is a mischaracterization of the works of parallel query how). If 10g and 12 c systems do not have the SAME hardware configuration, then you would naturally expect different time elapsed to run the same parallel queries. See the end of this answer for the additional information that you may provide.
But I would be very suspicious of the hardware configuration of the two systems. Maybe 10 g system has 16-core processors or more and 100's of discs in a matrix of big drives and maybe the 12 c system has only 4 cores of the processor and 4 disks. That would explain a lot about why the 12 c takes hours to run when the 10 g takes only 30 minutes.
Remember what I said in my last reply:
"Without any contrary information I guess the filter conditions are very low, the optimizer believes he needs of most of the data in the table and that a table scan or even a limited index scan complete is the"best"way to run this SQL. In other words, your query takes just time because your tables are big and your application has most of the data in these tables. "
When dealing with very large tables and to do a full table parallel analysis on them, the most important factor is the amount of raw hardware, you throw the ball to her. A system with twice the number of CPUS and twice the number of disks will run the same parallel query in half of the time, at least. It could be that the main reason for the 12 c system is much slower than the system of 10g, rather than on the implementation plan itself.
You may also provide us with the following information which would allow a better analysis:
- Row counts in each tables referenced in the query, and if one of them are partitioned.
- Hardware configurations for both systems - the 10g and the 12 a. Number of processors, the model number and speed, physical memory, CPU of discs.
- The discs are very important - 10g and 12 c have similar disk subsystems? You use simple old records, or you have a San, or some sort of disk array? Are the bays of identical drives in both systems? How are they connected? Fast Fibre Channel, or something else? Maybe even network storage?
- What is the size of the SGA in both systems? of values for MEMORY_TARGET and SGA_TARGET.
- The fact of the CLAIM_FACTS_AK9 index exist on the system of 10g. I guess he does, but I would like that it confirmed to be safe.
John Brady
-
Optimization of queries OR clause
I'm using Oracle 12.1.0.2.
I have a given below request that has 2 predicate with OR condition that contains text search in 2 tables (eir and eir_notes). It takes 20 seconds. The Charly come back in the second if I run the query with a single predicate without the GOLD clause. Therefore, I solved it by the union to place where. I've included the two sql with the explain plan below command.
Just for my knowledge, is there advice that I could use to make sql in OR more fast?
Slow SQL with OR:
SQL TEXT:
SELECT /*+ gather_plan_statistics */ COUNT (*) FROM (SELECT eir.actn_tx FROM EXAM_INCDT_RPT eir WHERE ( contains (eir.prblm_tx, :1) > 0 OR eir.exam_incdt_rpt_id IN (SELECT /*+ qb_name( qb_sub_note) */ exam_incdt_rpt_id FROM eir_note WHERE contains (note_tx, :2) > 0)))
SQL_ID 8rwvqyphavc0c, child number 1 ------------------------------------- SELECT /*+ gather_plan_statistics */ COUNT (*) FROM (SELECT eir.actn_tx FROM EXAM_INCDT_RPT eir WHERE ( contains (eir.prblm_tx, :1) > 0 OR eir.exam_incdt_rpt_id IN (SELECT /*+ qb_name( qb_sub_note) */ exam_incdt_rpt_id FROM eir_note WHERE contains (note_tx, :2) > 0) )) Plan hash value: 2956686415 ----------------------------------------------------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers | Reads | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | | 1343K(100)| | 1 |00:00:20.24 | 1467K| 6770 | | 1 | SORT AGGREGATE | | 1 | 1 | 105 | | | 1 |00:00:20.24 | 1467K| 6770 | |* 2 | FILTER | | 1 | | | | | 5419 |00:00:21.28 | 1467K| 6770 | | 3 | TABLE ACCESS FULL | EXAM_INCDT_RPT | 1 | 447K| 44M| 1343K (1)| 00:01:45 | 447K|00:00:00.69 | 5819 | 5816 | |* 4 | TABLE ACCESS BY INDEX ROWID BATCHED| EIR_NOTE | 441K| 1 | 273 | 6 (0)| 00:00:01 | 2 |00:00:02.48 | 567K| 226 | |* 5 | INDEX RANGE SCAN | EIR_NOTE_IX1 | 441K| 1 | | 1 (0)| 00:00:01 | 10753 |00:00:01.65 | 535K| 20 | ----------------------------------------------------------------------------------------------------------------------------------------------------------- Query Block Name / Object Alias (identified by operation id): ------------------------------------------------------------- 1 - SEL$F5BB74E1 3 - SEL$F5BB74E1 / EIR@SEL$2 4 - QB_SUB_NOTE / EIR_NOTE@QB_SUB_NOTE 5 - QB_SUB_NOTE / EIR_NOTE@QB_SUB_NOTE Outline Data ------------- /*+ BEGIN_OUTLINE_DATA IGNORE_OPTIM_EMBEDDED_HINTS OPTIMIZER_FEATURES_ENABLE('12.1.0.2') DB_VERSION('12.1.0.2') OPT_PARAM('_optim_peek_user_binds' 'false') ALL_ROWS OUTLINE_LEAF(@"QB_SUB_NOTE") OUTLINE_LEAF(@"SEL$F5BB74E1") MERGE(@"SEL$2") OUTLINE(@"QB_SUB_NOTE") OUTLINE(@"SEL$1") OUTLINE(@"SEL$2") FULL(@"SEL$F5BB74E1" "EIR"@"SEL$2") PQ_FILTER(@"SEL$F5BB74E1" SERIAL) INDEX_RS_ASC(@"QB_SUB_NOTE" "EIR_NOTE"@"QB_SUB_NOTE" ("EIR_NOTE"."EXAM_INCDT_RPT_ID")) BATCH_TABLE_ACCESS_BY_ROWID(@"QB_SUB_NOTE" "EIR_NOTE"@"QB_SUB_NOTE") END_OUTLINE_DATA */ Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter(("CTXSYS"."CONTAINS"("EIR"."PRBLM_TX",:1)>0 OR IS NOT NULL)) 4 - filter("CTXSYS"."CONTAINS"("NOTE_TX",:2)>0) 5 - access("EXAM_INCDT_RPT_ID"=:B1) Column Projection Information (identified by operation id): ----------------------------------------------------------- 1 - (#keys=0) COUNT(*)[22] 3 - "EIR".ROWID[ROWID,10], "EIR"."EXAM_INCDT_RPT_ID"[NUMBER,22], "EIR"."PRBLM_TX"[LOB,4000] 5 - "EIR_NOTE".ROWID[ROWID,10]
Explain the plan of sql with union
SQL TEXT:
SELECT /*+ gather_plan_statistics */ COUNT (*) FROM (SELECT * FROM EXAM_INCDT_RPT eir WHERE contains (eir.prblm_tx, :1) > 0 UNION ALL SELECT * FROM EXAM_INCDT_RPT WHERE exam_incdt_rpt_id IN (SELECT exam_incdt_rpt_id FROM eir_note WHERE contains (note_tx, :2) > 0))
-
Wrong number of returned lines 12 c
Hi all
We tested the upgrade from 11.2.0.3 to 12.1.0.2.5 (Oct 2015 psu) and ran into what I think it's a bug.
12 c
Select count (*) in the view_a;
rows returned 4056
Select col_a, col_b... from view_a;
rows returned 3879
I then tried to interview the base tables of the view with the same number of line problems.
We tried to update its stats, put in optimizer_features_enable = '11.2.0.3', empty the memory cache, configuration statistics_level = ALL with no luck.
Any suggestions or insights that could help?
Thank you
-RR
That said the execution plan? Could someone else be the modification of the data? Could it be related to https://jonathanlewis.wordpress.com/2015/11/09/wrong-results/ ?
-
Plan of 10gr 2 don't reproduce at 11 GR 2 - try to understand why
Just did an upgrade to 10.2.0.4 to 11.2.0.4 (AIX) to our EBS environment. Especially things were going pretty well, but have a boring SQL degradation which didn't fall not by our SPA tests. Tried to create a base to Plan the gr 10, 2 SQL tuning together we created beforehand, but the tuning advisor says that's not a reproducible (plan 3341830380 below).
I compared each table / index used in the query and have confirmed that there is no change TABLE/INDEX (slight possibility since there are quite a few patches interop EBS that had to be applied for the upgrade). Consultant recommended setting a profile, but that did not help. I have a gr 10, 2 env prevail, so I used to generate an outline stored and then copied the outline to the system 11 GR 2. We confirmed he used the outline, but the plan was always different and suboptimal (> 100 s). Then migrated the outline of a basic SQL, but always different/suboptimal plan. Then tried to extract the section SKETCH of the plan 10 gr 2 use it to create a manual SQL profile with the IMPORT_SQL_PROFILE procedure, but also, which did not help (he used the profile, but still suboptimal plan). Also tried to set optimizer_features_enabled = 10.2.0.4 but still no effect. The SQL is quite complex with a view embedded (this is EBS) 10053 trace is huge and beyond my ability to analyze. I know there must be something in the environment/params/structure that has changed so that the original plan cannot be used, but I was not able to understand.
Any help would be appreciated.
Here's the plan and 10.2.0.4 stats
SQL_ID, 20qss2003zzyn, number of children 0
-------------------------------------
SELECT THE VALUE A.ORGANIZATION_ID, A.ORGANIZATION_CODE, A.ORGANIZATION_NAME DESCRIPTION, ("N", 'N') NVL NVL (TO_NUMBER (NULL),-1), NULL, NVL ('Y', 'Y'), NVL (TO_CHAR (TO_DATE (NULL), 'J'), 0),
NVL (TO_CHAR (TO_DATE (NULL), 'J'), 0) OF ORG_ORGANIZATION_DEFINITIONS A WHERE ((EXISTE (SÉLECTIONNEZ 1 DE ORG_ACCESS_V OAV, FU FND_USER, FND_USER_RESP_GROUPS_DIRECT FUR OÙ FU.) CLAUSE)) USER_ID = FUR. USER_ID AND
OAV.ORGANIZATION_ID = A.ORGANIZATION_ID AND FU. USER_ID = FND_PROFILE. VALUE('USER_ID') AND FUR. RESPONSIBILITY_ID = FVO. (RESPONSIBILITY_ID)) AND A.ORGANIZATION_CODE NOT IN ('IMO', ' 001 ', ' 002')) AND 'Y' = 'Y '.
AND TO_DATE (: A00, ' ' YYYY/MM/DD HH24:MI:SS) BETWEEN NVL (TRUNC (TO_DATE (NULL)), TO_DATE (: A01, ' ' YYYY/MM/DD HH24:MI:SS)) AND NVL (TRUNC (TO_DATE (NULL)), TO_DATE (: A02, ' ' YYYY/MM/DD HH24:MI:SS)) ORDER BY))))
A.ORGANIZATION_CODE
Hash value of plan: 3220009238
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Begins | E - lines. E - bytes | Cost (% CPU). E Time | Pstart. Pstop | A - lines. A - time | Pads | OMem | 1Mem | Used Mem.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|* 1 | FILTER | | 1. | | | | | | 323. 00:00:04.48 | 857K | | | |
| 2. SORT ORDER BY | | 1. 1. 99. 119 (2). 00:00:02 | | | 323. 00:00:04.48 | 857K | 36864 | 36864 | 32768 (0) |
| 3. THE CARTESIAN MERGE JOIN. | 1. 1. 99. 17 (0) | 00:00:01 | | | 323. 00:00:04.47 | 857K | | | |
| 4. NESTED LOOPS | | 1. 1. 99. 12 (0) | 00:00:01 | | | 323. 00:00:04.47 | 857K | | | |
| 5. NESTED LOOPS | | 1. 1. 95. 11 (0) | 00:00:01 | | | 323. 00:00:04.47 | 857K | | | |
| 6. NESTED LOOPS | | 1. 1. 72. 9 (0) | 00:00:01 | | | 323. 00:00:04.47 | 856K | | | |
| 7. NESTED LOOPS | | 1. 1. 64. 8 (0) | 00:00:01 | | | 325. 00:00:04.46 | 856K | | | |
| 8. NESTED LOOPS | | 1. 1. 32. 7 (0) | 00:00:01 | | | 325. 00:00:04.46 | 856K | | | |
|* 9 | TABLE ACCESS BY INDEX ROWID | HR_ORGANIZATION_INFORMATION | 1. 1. 26. 6 (0). 00:00:01 | | | 328. 00:00:00.01 | 31. | | |
| * 10 | INDEX RANGE SCAN | HR_ORGANIZATION_INFORMATIO_IX1 | 1. 44. | 1 (0) | 00:00:01 | | | 336. 00:00:00.01 | 3. | | |
| * 11 | TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS | 328. 1. 6. 1 (0) | 00:00:01 | | | 325. 00:00:04.46 | 856K | | | |
| * 12 | INDEX UNIQUE SCAN | HR_ORGANIZATION_UNITS_PK | 328. 1. | 0 (0) | | | | 325. 00:00:04.44 | 855K | | | |
| 13. NESTED LOOPS | | 328. 1. 160. 101 (1) | 00:00:02 | | | 325. 00:00:04.43 | 855K | | | |
| * 14 | HASH JOIN | | 328. 1. 147. 101 (1) | 00:00:02 | | | 325. 00:00:04.43 | 855K | 1396K | 1396K | 1330K (0) |
| 15. NESTED LOOPS | | 328. 1. 137. 62 (0) | 00:00:01 | | | 7117 | 00:00:04.34 | 853K | | | |
| 16. NESTED LOOPS | | 328. 1. 130. 62 (0) | 00:00:01 | | | 7117 | 00:00:04.31 | 853K | | | |
| 17. NESTED LOOPS | | 328. 1. 126. 62 (0) | 00:00:01 | | | 7117 | 00:00:04.30 | 852K | | | |
| 18. NESTED LOOPS | | 328. 1. 108. 34 (0) | 00:00:01 | | | 7117 | 00:00:03.87 | 703K | | | |
| 19. NESTED LOOPS | | 328. 1. 51. 5 (0) | 00:00:01 | | | 29873 | 00:00:00.09 | 9054 | | | |
| 20. NESTED LOOPS | | 328. 1. 37. 3 (0) | 00:00:01 | | | 327. 00:00:00.03 | 2949 | | | |
| 21. NESTED LOOPS | | 328. 1. 22. 2 (0) | 00:00:01 | | | 327. 00:00:00.03 | 1968 | | | |
| 22. NESTED LOOPS | | 328. 1. 18. 2 (0) | 00:00:01 | | | 328. 00:00:00.03 | 1640 | | | |
| 23. NESTED LOOPS | | 328. 1. 12. 1 (0) | 00:00:01 | | | 328. 00:00:00.01 | 984 | | | |
| * 24. INDEX UNIQUE SCAN | FND_USER_U1 | 328. 1. 5. 1 (0) | 00:00:01 | | | 328. 00:00:00.01 | 656. | | |
| * 25. INDEX UNIQUE SCAN | HR_ALL_ORGANIZATION_UNTS_TL_PK | 328. 1. 7. 0 (0) | | | | 328. 00:00:00.01 | 328. | | |
| * 26. TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS | 328. 1. 6. 1 (0) | 00:00:01 | | | 328. 00:00:00.02 | 656. | | |
| * 27. INDEX UNIQUE SCAN | HR_ORGANIZATION_UNITS_PK | 328. 1. | 0 (0) | | | | 328. 00:00:00.01 | 328. | | |
| * 28. INDEX UNIQUE SCAN | MTL_PARAMETERS_U1 | 328. 1. 4. 0 (0) | | | | 327. 00:00:00.01 | 328. | | |
| 29. TABLE ACCESS BY INDEX ROWID | FND_USER | 327. 1. 15. 1 (0) | 00:00:01 | | | 327. 00:00:00.01 | 981. | | |
| * 30 | INDEX UNIQUE SCAN | FND_USER_U1 | 327. 1. | 0 (0) | | | | 327. 00:00:00.01 | 654 | | | |
| 31. TABLE ACCESS BY INDEX ROWID | ORG_ACCESS | 327. 1. 14. 2 (0) | 00:00:01 | | | 29873 | 00:00:00.03 | 6105 | | | |
| * 32 | INDEX RANGE SCAN | ORG_ACCESS_N1 | 327. 1. | 1 (0) | 00:00:01 | | | 29873 | 00:00:00.01 | 737. | | |
| 33. RANGE OF PARTITION ALL THE | | 29873 | 1. 57. 29 (0) | 00:00:01 | 1. 14. 7117 | 00:00:03.76 | 694K | | | |
| * 34 | TABLE ACCESS BY LOCAL INDEX ROWID | WF_LOCAL_USER_ROLES | 418K | 1. 57. 29 (0) | 00:00:01 | 1. 14. 7117 | 00:00:03.36 | 694K | | | |
| * 35 | INDEX RANGE SCAN | WF_LOCAL_USER_ROLES_U1 | 418K | 1. | 28 (0) | 00:00:01 | 1. 14. 7117 | 00:00:02.49 | 687K | | | |
| 36. RANGE OF PARTITION ALL THE | | 7117 | 1. 18. 28 (0) | 00:00:01 | 1. 14. 7117 | 00:00:00.42 | 149K | | | |
| * 37 | INDEX RANGE SCAN | WF_LOCAL_ROLES_U1 | 99638 | 1. 18. 28 (0) | 00:00:01 | 1. 14. 7117 | 00:00:00.33 | 149K | | | |
| * 38 | INDEX UNIQUE SCAN | FND_APPLICATION_U1 | 7117 | 1. 4. 0 (0) | | | | 7117 | 00:00:00.01 | 326. | | |
| * 39 | INDEX UNIQUE SCAN | FND_APPLICATION_TL_U1 | 7117 | 1. 7. 0 (0) | | | | 7117 | 00:00:00.01 | 326. | | |
| 40. TABLE ACCESS FULL | FND_RESPONSIBILITY | 325. 8972. 89720 | 38 (0) | 00:00:01 | | | 42266 | 00:00:00.01 | 1782. | | |
| * 41. INDEX UNIQUE SCAN | FND_RESPONSIBILITY_TL_U1 | 325. 1. 13. 0 (0) | | | | 325. 00:00:00.01 | 650 | | | |
| 42. TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS_TL | 325. 1. 32. 1 (0) | 00:00:01 | | | 325. 00:00:00.01 | 327. | | |
| * 43. INDEX UNIQUE SCAN | HR_ALL_ORGANIZATION_UNTS_TL_PK | 325. 1. | 0 (0) | | | | 325. 00:00:00.01 | 2. | | |
| * 44 | TABLE ACCESS BY INDEX ROWID | MTL_PARAMETERS | 325. 1. 8. 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 327. | | |
| * 45 | INDEX UNIQUE SCAN | MTL_PARAMETERS_U1 | 325. 1. | 0 (0) | | | | 325. 00:00:00.01 | 2. | | |
| 46. TABLE ACCESS BY INDEX ROWID | HR_ORGANIZATION_INFORMATION | 323. 1. 23. 2 (0) | 00:00:01 | | | 323. 00:00:00.01 | 653. | | |
| * 47 | INDEX RANGE SCAN | HR_ORGANIZATION_INFORMATIO_FK2 | 323. 1. | 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 330. | | |
| * 48 | INDEX SCAN FULL | GL_SETS_OF_BOOKS_U2 | 323. 1. 4. 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 2. | | |
| 49. KIND OF BUFFER. | 323. 1. | 17 (6) | 00:00:01 | | | 323. 00:00:00.01 | 15. 2048 | 2048 | 2048 (0) |
| 50. TABLE ACCESS FULL | FND_PRODUCT_GROUPS | 1. 1. | 5 (0) | 00:00:01 | | | 1. 00:00:00.01 | 15. | | |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Name of the query block / Alias object (identified by the operation identity card):
-------------------------------------------------------------
1 SALT 5 $160134
9 SALT$ 5 160134 / HOI1@SEL$2
10 SALT$ 5 160134 / HOI1@SEL$2
11 SALT$ 5 160134 / HAO@SEL$3
12 SALT$ 5 160134 / HAO@SEL$3
13 SALT$ 4F965A88
24 SALT$ 4F965A88 / FU@SEL$4
25 SALT$ 4F965A88 / HAOTL@SEL$6
26 SALT$ 4F965A88 / HAO@SEL$6
27 SALT$ 4F965A88 / HAO@SEL$6
28 SALT$ 4F965A88 / MP@SEL$5
29 SALT$ 4F965A88 / U@SEL$9
30 SALT$ 4F965A88 / U@SEL$9
31 SALT$ 4F965A88 / OA@SEL$5
32 SALT$ 4F965A88 / OA@SEL$5
34 SALT$ 4F965A88 / WF_LOCAL_USER_ROLES@SEL$10
35 SALT$ 4F965A88 / WF_LOCAL_USER_ROLES@SEL$10
37 SALT$ 4F965A88 / WLR@SEL$9
38 SALT$ 4F965A88 / B@SEL$8
39 SALT$ 4F965A88 / T@SEL$8
40 SALT$ 4F965A88 / B@SEL$7
41 SALT$ 4F965A88 / T@SEL$7
42 SALT$ 5 160134 / HAOTL@SEL$3
43 SALT$ 5 160134 / HAOTL@SEL$3
44 SALT$ 5 160134 / MP@SEL$2
45 SALT$ 5 160134 / MP@SEL$2
46 SALT$ 5 160134 / HOI2@SEL$2
47 SALT$ 5 160134 / HOI2@SEL$2
48 SALT$ 5 160134 / GSOB@SEL$2
50 SALT$ 5 160134 / FPG@SEL$2
Vector data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE ('10.2.0.4')
OPT_PARAM ('_b_tree_bitmap_plans' 'false')
OPT_PARAM ('_fast_full_scan_enabled' 'false')
OPT_PARAM ('_index_join_enabled' 'false')
ALL_ROWS
OUTLINE_LEAF(@"SEL$4F965A88")
MERGE(@"SEL$0EE6DB63")
MERGE(@"SEL$443FD15E")
OUTLINE_LEAF(@"SEL$5C160134")
MERGE(@"SEL$335DD26A")
OUTLINE(@"SEL$4")
OUTLINE(@"SEL$0EE6DB63")
MERGE(@"SEL$10")
OUTLINE(@"SEL$443FD15E")
MERGE(@"SEL$6")
MERGE(@"SEL$7")
MERGE(@"SEL$8")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$335DD26A")
MERGE(@"SEL$3")
OUTLINE(@"SEL$9")
OUTLINE(@"SEL$10")
OUTLINE(@"SEL$5")
OUTLINE(@"SEL$6")
OUTLINE(@"SEL$7")
OUTLINE(@"SEL$8")
OUTLINE(@"SEL$2")
OUTLINE(@"SEL$3")
INDEX_RS_ASC (@"SALT 5 $160134" "HOI1"@"SEL$2" ("HR_ORGANIZATION_INFORMATION".) "ORG_INFORMATION1")) "
INDEX_RS_ASC (@"SALT 5 $160134" "HAO"@"SEL$3" ("HR_ALL_ORGANIZATION_UNITS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT 5 $160134" "HAOTL"@"SEL$3" ("HR_ALL_ORGANIZATION_UNITS_TL".) "ORGANIZATION_ID" "HR_ALL_ORGANIZATION_UNITS_TL" "." " LANGUAGE'))
INDEX_RS_ASC (@"SALT 5 $160134" "MP"@"SEL$2" ("MTL_PARAMETERS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT 5 $160134" "HOI2"@"SEL$2" ("HR_ORGANIZATION_INFORMATION".) "ORGANIZATION_ID" "HR_ORGANIZATION_INFORMATION" "." " ORG_INFORMATION_CONTEXT'))
INDEX (@"SALT 5 $160134" "GSOB"@"SEL$2" ("GL_SETS_OF_BOOKS".) "SET_OF_BOOKS_ID")) "
FULL (@"SALT 5 $160134" "FPG"@"SEL$2")
LEADING (@"SALT 5 $160134" "HOI1"@"SEL$2" "HAO"@"SEL$3" "HAOTL"@"SEL$3" "MP"@"SEL$2" "HOI2"@"SEL$2" "GSOB"@"SEL$2" "FPG"@"SEL$2")
USE_NL (@"SALT 5 $160134" "HAO"@"SEL$3")
USE_NL (@"SALT 5 $160134" "HAOTL"@"SEL$3")
USE_NL (@"SALT 5 $160134" "MP"@"SEL$2")
USE_NL (@"SALT 5 $160134" "HOI2"@"SEL$2")
USE_NL (@"SALT 5 $160134" "GSOB"@"SEL$2")
USE_MERGE_CARTESIAN (@"SALT 5 $160134" "FPG"@"SEL$2")
INDEX (@"SALT$ 4F965A88" "FU"@"SEL$4" ("FND_USER".) "USER_ID")) "
INDEX (@"SALT$ 4F965A88" "HAOTL"@"SEL$6" ("HR_ALL_ORGANIZATION_UNITS_TL".) "ORGANIZATION_ID" "HR_ALL_ORGANIZATION_UNITS_TL" "." " LANGUAGE'))
INDEX_RS_ASC (@"SALT$ 4F965A88" "HAO"@"SEL$6" ("HR_ALL_ORGANIZATION_UNITS".) "ORGANIZATION_ID")) "
INDEX (@"SALT$ 4F965A88" "MP"@"SEL$5" ("MTL_PARAMETERS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT$ 4F965A88" "U"@"SEL$9" ("FND_USER".) "USER_ID")) "
INDEX_RS_ASC (@"SALT$ 4F965A88" "OA"@"SEL$5" ("ORG_ACCESS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT$ 4F965A88" "WF_LOCAL_USER_ROLES"@"SEL$10" ("WF_LOCAL_USER_ROLES".) "USER_NAME" 'WF_LOCAL_USER_ROLES' "." " ROLE NAME""WF_LOCAL_USER_ROLES. " "" USER_ORIG_SYSTEM ".
'WF_LOCAL_USER_ROLES '. ' ' USER_ORIG_SYSTEM_ID ' 'WF_LOCAL_USER_ROLES '. ' ' ROLE_ORIG_SYSTEM ' 'WF_LOCAL_USER_ROLES '. ' ' ROLE_ORIG_SYSTEM_ID ' 'WF_LOCAL_USER_ROLES '. (("" ID_PARTITION "))
INDEX (@"SALT$ 4F965A88" "WLR"@"SEL$9" ("WF_LOCAL_ROLES".) "NAME" "WF_LOCAL_ROLES" "." " ORIG_SYSTEM' 'WF_LOCAL_ROLES '. ' ' ORIG_SYSTEM_ID ' 'WF_LOCAL_ROLES '. (("" ID_PARTITION "))
INDEX (@"SALT$ 4F965A88" "B"@"SEL$8" ("FND_APPLICATION".) "APPLICATION_ID'))"
INDEX (@"SALT$ 4F965A88" "T"@"SEL$8" ("FND_APPLICATION_TL".) "APPLICATION_ID" "FND_APPLICATION_TL" "." " LANGUAGE'))
FULL (@"SALT$ 4F965A88" "B"@"SEL$7")
INDEX (@"SALT$ 4F965A88" "T"@"SEL$7" ("FND_RESPONSIBILITY_TL".) "APPLICATION_ID" "FND_RESPONSIBILITY_TL" "." " RESPONSIBILITY_ID' 'FND_RESPONSIBILITY_TL '. ((' ' LANGUAGE '))
LEADING (@"SALT$ 4F965A88" "FU"@"SEL$4" "HAOTL"@"SEL$6" "HAO"@"SEL$6" "MP"@"SEL$5" "U"@"SEL$9" "OA"@"SEL$5" "WF_LOCAL_USER_ROLES"@"SEL$10" "WLR"@"SEL$9" "B"@"SEL$8" "T"@"SEL$8" "B"@"SEL$7" "T"@"SEL$7")
USE_NL (@"SALT$ 4F965A88" "HAOTL"@"SEL$6")
USE_NL (@"SALT$ 4F965A88" "HAO"@"SEL$6")
USE_NL (@"SALT$ 4F965A88" "MP"@"SEL$5")
USE_NL (@"SALT$ 4F965A88" "U"@"SEL$9")
USE_NL (@"SALT$ 4F965A88" "OA"@"SEL$5")
USE_NL (@"SALT$ 4F965A88" "WF_LOCAL_USER_ROLES"@"SEL$10")
USE_NL (@"SALT$ 4F965A88" "WLR"@"SEL$9")
USE_NL (@"SALT$ 4F965A88" "B"@"SEL$8")
USE_NL (@"SALT$ 4F965A88" "T"@"SEL$8")
USE_HASH (@"SALT$ 4F965A88" "B"@"SEL$7")
USE_NL (@"SALT$ 4F965A88" "T"@"SEL$7")
END_OUTLINE_DATA
*/
Information of predicates (identified by the operation identity card):
---------------------------------------------------
1. ((TO_DATE (: A00,'' AAAA/MM/JJ HH24:MI:SS) filter < = NVL (TRUNC (NULL), TO_DATE (: A02, "YYYY/MM/DD HH24:MI:SS)) AND TO_DATE (: A00, ' YYYY/MM/DD HH24:MI:SS') > = NVL (TRUNC (NULL), TO_DATE (: A01,' YYYY/MM/DD HH24:MI:SS')))))))))
9 filter (("HOI1". "ORG_INFORMATION2" = 'Y' AND 'HOI1'. "" ORG_INFORMATION_CONTEXT "|" = 'CLASS'))
10 - access("HOI1".") ORG_INFORMATION1 "=" INV")
11 - filter("HAO".") BUSINESS_GROUP_ID "= DECODE ("HR_GENERAL"". ")" "GET_XBG_PROFILE"(), 'Y', 'HAO'." BUSINESS_GROUP_ID', 'HR_GENERAL '. "GET_BUSINESS_GROUP_ID" (())) "
12 - access("HAO".") ORGANIZATION_ID "= 'HOI1'." ORGANIZATION_ID')
filter (IS NOT NULL)
14 - access("B".") RESPONSIBILITY_ID "=" OA ". ("' RESPONSIBILITY_ID")
24 - access("FU".") USER_ID «= TO_NUMBER ("FND_PROFILE".» VALUE "('USER_ID')))"
25 - access("HAOTL".") ORGANIZATION_ID ' =: B1 AND 'HAOTL'. '. LANGUAGE "= USERENV ('LANG'))"
filter (DECODE ("HR_SECURITY". "VIEW_ALL"(), "Y", "TRUE" ", HR_SECURITY" "." " SHOW_RECORD "("HR_ALL_ORGANIZATION_UNITS","HAOTL". ((("" ORGANIZATION_ID ")) = 'TRUE')
26 - filter("HAO".") BUSINESS_GROUP_ID "= DECODE ("HR_GENERAL"". ")" "GET_XBG_PROFILE"(), 'Y', 'HAO'." BUSINESS_GROUP_ID', 'HR_GENERAL '. "GET_BUSINESS_GROUP_ID" (())) "
27 - access("HAO".") ORGANIZATION_ID "(=:B1)"
filter ("HAO". "ORGANIZATION_ID"="HAOTL" "." " ORGANIZATION_ID')
28 - access("MP".") ORGANIZATION_ID "(=:B1)"
filter ("MP". "ORGANIZATION_ID"="HAO" "." " ORGANIZATION_ID')
30 - access("FU".") USER_ID '=' U '. (' ' USER_ID ')
32 - access("HAO".") ORGANIZATION_ID "=" OA ". ("' ORGANIZATION_ID")
filter ("OA". "ORGANIZATION_ID"(=:B1) "
34. (("ASSIGNMENT_TYPE" = "B" OU "ASSIGNMENT_TYPE" = serait ') filter)
35 - access("U".") USER_NAME "=" USERNAME"AND"ROLE_ORIG_SYSTEM"="FND_RESP"AND"ROLE_ORIG_SYSTEM_ID "=" OA ". ("' RESPONSIBILITY_ID")
filter (("ROLE_ORIG_SYSTEM" = "FND_RESP" ET "Nom_rôle» PAS COMME ' FND_RESP |)) % | ANY "AND"ROLE_ORIG_SYSTEM_ID "=" OA"". "" RESPONSIBILITY_ID'))
37 - access ("ROLE_NAME"= "WLR"." NAME")
38 - access("B".") APPLICATION_ID '="OA". ("' RESP_APPLICATION_ID")
39 - access("B".") APPLICATION_ID '=' T '. "' APPLICATION_ID ' AND 'T '. "LANGUAGE" = USERENV ('LANG')) "
41 - access("B".") APPLICATION_ID '=' T '. "' APPLICATION_ID ' AND 'B '. "" RESPONSIBILITY_ID "=" T ". "" RESPONSIBILITY_ID "AND"T ". "LANGUAGE" = USERENV ('LANG')) "
43 - access("HAO".") ORGANIZATION_ID "=" HAOTL. " "" ORGANIZATION_ID "AND"HAOTL ". "LANGUAGE" = USERENV ('LANG')) "
filter (DECODE ("HR_SECURITY". "VIEW_ALL"(), "Y", "TRUE" ", HR_SECURITY" "." " SHOW_RECORD "("HR_ALL_ORGANIZATION_UNITS","HAOTL". ((("" ORGANIZATION_ID ")) = 'TRUE')
44 filter (("MP". "ORGANIZATION_CODE"<>'OMI' AND 'MP'." ORGANIZATION_CODE' <>'001' AND 'MP '. (("' ORGANIZATION_CODE" <>' 002'))
45 - access("HAO".") ORGANIZATION_ID "=" MP ". ("' ORGANIZATION_ID")
47 - access("HAO".") ORGANIZATION_ID "= 'HOI2'." ORGANIZATION_ID')
filter ("HOI2". "ORG_INFORMATION_CONTEXT" | "="Accounting information")"
48 - filter("HOI2".") ORG_INFORMATION1 «= TO_CHAR ("GSOB".» SET_OF_BOOKS_ID'))
And here is one of 11.2.0.4 plans
SQL_ID, 20qss2003zzyn, number of children 0
-------------------------------------
SELECT THE VALUE A.ORGANIZATION_ID, A.ORGANIZATION_CODE, A.ORGANIZATION_NAME
DESCRIPTION, NVL ("N", 'N'), (TO_NUMBER (NULL),-1), NULL, NVL NVL ('Y',
'Y'), NVL (TO_CHAR (TO_DATE (NULL), 'J'), 0), NVL (TO_CHAR (TO_DATE (NULL),
"J"), 0) OF ORG_ORGANIZATION_DEFINITIONS A ((EXISTS (SELECT 1 WHERE CLAUSE
ORG_ACCESS_V FVO, FU FND_USER, FND_USER_RESP_GROUPS_DIRECT FUR
WHERE FU. USER_ID = FUR. USER_ID AND OAV.ORGANIZATION_ID =
A.ORGANIZATION_ID AND FU. USER_ID = FND_PROFILE. VALUE ('USER_ID') AND
FUR. RESPONSIBILITY_ID = FVO. RESPONSIBILITY_ID)) AND A.ORGANIZATION_CODE
NO ('IMO', ' 001 ', ' 002')) AND 'Y' = 'Y' AND TO_DATE(:A00,)
"YYYY/MM/DD HH24:MI:SS") BETWEEN NVL (TRUNC (TO_DATE (NULL)),
TO_DATE (: A01, ' YYYY/MM/DD HH24:MI:SS')) AND NVL (TRUNC (TO_DATE (NULL)),)
TO_DATE(:A02, 'YYYY/MM/DD HH24:MI:SS')) ORDER BY A.ORGANIZATION_CODE)
Hash value of plan: 3669628009
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Begins | E - lines. E - bytes | Cost (% CPU). E Time | Pstart. Pstop | A - lines. A - time | Pads | Bed | OMem | 1Mem | Used Mem.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1. | | 145 (100) | | | | 323. 00:02:27.60 | 38 M | 2. | | |
| 1. SORT ORDER BY | | 1. 1. 97. 145 (1) | 00:00:02 | | | 323. 00:02:27.60 | 38 M | 2. 33792 | 33792 | 30720 (0) |
|* 2 | FILTER | | 1. | | | | | | 323. 00:02:27.60 | 38 M | 2. | | |
| 3. THE CARTESIAN MERGE JOIN. | 1. 1. 97. 16 (0) | 00:00:01 | | | 323. 00:02:27.60 | 38 M | 2. | | |
| 4. NESTED LOOPS | | 1. 1. 97. 11 (0) | 00:00:01 | | | 323. 00:02:27.60 | 38 M | 2. | | |
| 5. NESTED LOOPS | | 1. 1. 93. 10 (0) | 00:00:01 | | | 323. 00:02:27.59 | 38 M | 2. | | |
| 6. NESTED LOOPS | | 1. 1. 71. 9 (0) | 00:00:01 | | | 323. 00:02:27.59 | 38 M | 2. | | |
| 7. NESTED LOOPS | | 1. 1. 46. 7 (0) | 00:00:01 | | | 331. 00:02:27.58 | 38 M | 2. | | |
| 8. NESTED LOOPS | | 1. 1. 38. 6 (0). 00:00:01 | | | 333. 00:02:27.58 | 38 M | 2. | | |
| 9. TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS_TL | 1. 4. 128. 2 (0) | 00:00:01 | | | 360 | 00:00:00.10 | 288. 2. | | |
| * 10 | INDEX SKIP SCAN | HR_ALL_ORGANIZATION_UNTS_TL_PK | 1. 1. | 1 (0) | 00:00:01 | | | 360 | 00:00:00.10 | 144. 2. | | |
| * 11 | TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS | 360 | 1. 6. 1 (0) | 00:00:01 | | | 333. 00:02:27.47 | 38 M | 0 | | | |
| * 12 | INDEX UNIQUE SCAN | HR_ORGANIZATION_UNITS_PK | 360 | 1. | 0 (0) | | | | 333. 00:02:27.42 | 38 M | 0 | | | |
| 13. NESTED LOOPS | | 360 | 1. 178. 128 (0) | 00:00:02 | | | 333. 00:02:27.41 | 38 M | 0 | | | |
| * 14 | HASH JOIN | | 360 | 1. 165. 128 (0) | 00:00:02 | | | 333. 00:02:27.40 | 38 M | 0 | 789K | 789K | 1581K (0) |
| 15. NESTED LOOPS | | 360 | 1. 155. 90 (0) | 00:00:02 | | | 7152 | 00:02:27.08 | 38 M | 0 | | | |
| 16. NESTED LOOPS | | 360 | 2. 224. 34 (0) | 00:00:01 | | | 1733K | 00:00:15.19 | 1946K | 0 | | | |
| 17. NESTED LOOPS | | 360 | 1. 57. 5 (0) | 00:00:01 | | | 30311. 00:00:00.46 | 9318. 0 | | | |
| 18. NESTED LOOPS | | 360 | 1. 50. 5 (0) | 00:00:01 | | | 30311. 00:00:00.35 | 8981 | 0 | | | |
| 19. NESTED LOOPS | | 360 | 1. 46. 5 (0) | 00:00:01 | | | 30311. 00:00:00.23 | 8644. 0 | | | |
| 20. NESTED LOOPS | | 360 | 1. 32. 3 (0) | 00:00:01 | | | 335. 00:00:00.08 | 2221 | 0 | | | |
| 21. NESTED LOOPS | | 360 | 1. 28. 3 (0) | 00:00:01 | | | 360 | 00:00:00.07 | 1861. 0 | | | |
| 22. NESTED LOOPS | | 360 | 1. 22. 2 (0) | 00:00:01 | | | 360 | 00:00:00.03 | 1085 | 0 | | | |
| 23. TABLE ACCESS BY INDEX ROWID | FND_USER | 360 | 1. 15. 2 (0) | 00:00:01 | | | 360 | 00:00:00.02 | 725 | 0 | | | |
| * 24. INDEX UNIQUE SCAN | FND_USER_U1 | 360 | 1. | 1 (0) | 00:00:01 | | | 360 | 00:00:00.02 | 365. 0 | | | |
| * 25. INDEX UNIQUE SCAN | HR_ALL_ORGANIZATION_UNTS_TL_PK | 360 | 1. 7. 0 (0) | | | | 360 | 00:00:00.01 | 360 | 0 | | | |
| * 26. TABLE ACCESS BY INDEX ROWID | HR_ALL_ORGANIZATION_UNITS | 360 | 1. 6. 1 (0) | 00:00:01 | | | 360 | 00:00:00.04 | 776. 0 | | | |
| * 27. INDEX UNIQUE SCAN | HR_ORGANIZATION_UNITS_PK | 360 | 1. | 0 (0) | | | | 360 | 00:00:00.01 | 360 | 0 | | | |
| * 28. INDEX UNIQUE SCAN | MTL_PARAMETERS_U1 | 360 | 1. 4. 0 (0) | | | | 335. 00:00:00.01 | 360 | 0 | | | |
| 29. TABLE ACCESS BY INDEX ROWID | ORG_ACCESS | 335. 1. 14. 2 (0) | 00:00:01 | | | 30311. 00:00:00.14 | 6423 | 0 | | | |
| * 30 | INDEX RANGE SCAN | ORG_ACCESS_N1 | 335. 1. | 1 (0) | 00:00:01 | | | 30311. 00:00:00.05 | 752. 0 | | | |
| * 31. INDEX UNIQUE SCAN | FND_APPLICATION_U1 | 30311. 1. 4. 0 (0) | | | | 30311. 00:00:00.07 | 337. 0 | | | |
| * 32 | INDEX UNIQUE SCAN | FND_APPLICATION_TL_U1 | 30311. 1. 7. 0 (0) | | | | 30311. 00:00:00.08 | 337. 0 | | | |
| 33. RANGE OF PARTITION ALL THE | | 30311. 1. 55. 29 (0) | 00:00:01 | 1. 14. 1733K | 00:00:14.01 | K 1937 | 0 | | | |
| 34. TABLE ACCESS BY LOCAL INDEX ROWID | WF_LOCAL_USER_ROLES | 424K | 1. 55. 29 (0) | 00:00:01 | 1. 14. 1733K | 00:00:13.04 | K 1937 | 0 | | | |
| * 35 | INDEX RANGE SCAN | WF_LOCAL_USER_ROLES_N7 | 424K | 1. | 28 (0) | 00:00:01 | 1. 14. 1733K | 00:00:03.56 | 615K | 0 | | | |
| 36. RANGE OF PARTITION ALL THE | | 1733K | 1. 43. 28 (0) | 00:00:01 | 1. 14. 7152 | 00:02:10.72 | 36 M | 0 | | | |
| * 37 | INDEX RANGE SCAN | WF_USER_ROLE_ASSIGNMENTS_N1 | 24 M | 1. 43. 28 (0) | 00:00:01 | 1. 14. 7152 | 00:01:56.00 | 36 M | 0 | | | |
| 38. TABLE ACCESS FULL | FND_RESPONSIBILITY | 333. 9041. 90410 | 38 (0) | 00:00:01 | | | 49837 | 00:00:00.03 | 1573. 0 | | | |
| * 39 | INDEX UNIQUE SCAN | FND_RESPONSIBILITY_TL_U1 | 333. 1. 13. 0 (0) | | | | 333. 00:00:00.01 | 536. 0 | | | |
| * 40 | TABLE ACCESS BY INDEX ROWID | MTL_PARAMETERS | 333. 1. 8. 1 (0) | 00:00:01 | | | 331. 00:00:00.01 | 337. 0 | | | |
| * 41. INDEX UNIQUE SCAN | MTL_PARAMETERS_U1 | 333. 1. | 0 (0) | | | | 333. 00:00:00.01 | 4. 0 | | | |
| * 42 | TABLE ACCESS BY INDEX ROWID | HR_ORGANIZATION_INFORMATION | 331. 1. 25. 2 (0) | 00:00:01 | | | 323. 00:00:00.01 | 161. 0 | | | |
| * 43. INDEX RANGE SCAN | HR_ORGANIZATION_INFORMATIO_FK2 | 331. 2. | 1 (0) | 00:00:01 | | | 662. 00:00:00.01 | 43. 0 | | | |
| 44. TABLE ACCESS BY INDEX ROWID | HR_ORGANIZATION_INFORMATION | 323. 1. 22. 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 164. 0 | | | |
| * 45 | INDEX RANGE SCAN | HR_ORGANIZATION_INFORMATIO_FK2 | 323. 1. | 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 43. 0 | | | |
| * 46 | INDEX SCAN FULL | GL_SETS_OF_BOOKS_U2 | 323. 1. 4. 1 (0) | 00:00:01 | | | 323. 00:00:00.01 | 3. 0 | | | |
| 47. KIND OF BUFFER. | 323. 1. | 16 (7) | 00:00:01 | | | 323. 00:00:00.01 | 14. 0 | 2048 | 2048 | 2048 (0) |
| 48. TABLE ACCESS FULL | FND_PRODUCT_GROUPS | 1. 1. | 5 (0) | 00:00:01 | | | 1. 00:00:00.01 | 14. 0 | | | |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Name of the query block / Alias object (identified by the operation identity card):
-------------------------------------------------------------
1 SALT 5 $160134
9 SALT$ 5 160134 / HAOTL@SEL$3
10 SALT$ 5 160134 / HAOTL@SEL$3
11 SALT$ 5 160134 / HAO@SEL$3
12 SALT$ 5 160134 / HAO@SEL$3
13 SALT$ F6C42A04
23 SALT$ F6C42A04 / FU@SEL$4
24 SALT$ F6C42A04 / FU@SEL$4
25 SALT$ F6C42A04 / HAOTL@SEL$6
26 SALT$ F6C42A04 / HAO@SEL$6
27 SALT$ F6C42A04 / HAO@SEL$6
28 SALT$ F6C42A04 / MP@SEL$5
29 SALT$ F6C42A04 / OA@SEL$5
30 SALT$ F6C42A04 / OA@SEL$5
31 SALT$ F6C42A04 / B@SEL$8
32 SALT$ F6C42A04 / T@SEL$8
34 SALT$ F6C42A04 / WF_LOCAL_USER_ROLES@SEL$12
35 SALT$ F6C42A04 / WF_LOCAL_USER_ROLES@SEL$12
37 SALT$ F6C42A04 / WURA@SEL$9
38 SALT$ F6C42A04 / B@SEL$7
39 SALT$ F6C42A04 / T@SEL$7
40 SALT$ 5 160134 / MP@SEL$2
41 SALT$ 5 160134 / MP@SEL$2
42 SALT$ 5 160134 / HOI1@SEL$2
43 SALT$ 5 160134 / HOI1@SEL$2
44 SALT$ 5 160134 / HOI2@SEL$2
45 SALT$ 5 160134 / HOI2@SEL$2
46 SALT$ 5 160134 / GSOB@SEL$2
48 SALT$ 5 160134 / FPG@SEL$2
Vector data
-------------
/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE ('11.2.0.4')
DB_VERSION ('11.2.0.4')
OPT_PARAM ('_b_tree_bitmap_plans' 'false')
OPT_PARAM ('_fast_full_scan_enabled' 'false')
ALL_ROWS
OUTLINE_LEAF(@"SEL$F6C42A04")
ELIMINATE_JOIN (@"SALT$ AE42E34E" "U"@"SEL$9")
OUTLINE_LEAF(@"SEL$5C160134")
MERGE(@"SEL$335DD26A")
OUTLINE(@"SEL$AE42E34E")
MERGE(@"SEL$443FD15E")
MERGE(@"SEL$C05AD324")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$335DD26A")
MERGE(@"SEL$3")
OUTLINE(@"SEL$4")
OUTLINE(@"SEL$443FD15E")
MERGE(@"SEL$6")
MERGE(@"SEL$7")
MERGE(@"SEL$8")
OUTLINE(@"SEL$C05AD324")
MERGE(@"SEL$12")
OUTLINE(@"SEL$2")
OUTLINE(@"SEL$3")
OUTLINE(@"SEL$5")
OUTLINE(@"SEL$6")
OUTLINE(@"SEL$7")
OUTLINE(@"SEL$8")
OUTLINE(@"SEL$9")
OUTLINE(@"SEL$12")
INDEX_SS (@"SALT 5 $160134" "HAOTL"@"SEL$3" ("HR_ALL_ORGANIZATION_UNITS_TL".) "ORGANIZATION_ID" "HR_ALL_ORGANIZATION_UNITS_TL" "." " LANGUAGE'))
INDEX_RS_ASC (@"SALT 5 $160134" "HAO"@"SEL$3" ("HR_ALL_ORGANIZATION_UNITS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT 5 $160134" "MP"@"SEL$2" ("MTL_PARAMETERS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT 5 $160134" "HOI1"@"SEL$2" ("HR_ORGANIZATION_INFORMATION".) "ORGANIZATION_ID" "HR_ORGANIZATION_INFORMATION" "." " ORG_INFORMATION_CONTEXT'))
INDEX_RS_ASC (@"SALT 5 $160134" "HOI2"@"SEL$2" ("HR_ORGANIZATION_INFORMATION".) "ORGANIZATION_ID" "HR_ORGANIZATION_INFORMATION" "." " ORG_INFORMATION_CONTEXT'))
INDEX (@"SALT 5 $160134" "GSOB"@"SEL$2" ("GL_SETS_OF_BOOKS".) "SET_OF_BOOKS_ID")) "
FULL (@"SALT 5 $160134" "FPG"@"SEL$2")
LEADING (@"SALT 5 $160134" "HAOTL"@"SEL$3" "HAO"@"SEL$3" "MP"@"SEL$2" "HOI1"@"SEL$2" "HOI2"@"SEL$2" "GSOB"@"SEL$2" "FPG"@"SEL$2")
USE_NL (@"SALT 5 $160134" "HAO"@"SEL$3")
USE_NL (@"SALT 5 $160134" "MP"@"SEL$2")
USE_NL (@"SALT 5 $160134" "HOI1"@"SEL$2")
USE_NL (@"SALT 5 $160134" "HOI2"@"SEL$2")
USE_NL (@"SALT 5 $160134" "GSOB"@"SEL$2")
USE_MERGE_CARTESIAN (@"SALT 5 $160134" "FPG"@"SEL$2")
PUSH_SUBQ(@"SEL$F6C42A04")
INDEX_RS_ASC (@"SALT$ F6C42A04" "FU"@"SEL$4" ("FND_USER".) "USER_ID")) "
INDEX (@"SALT$ F6C42A04" "HAOTL"@"SEL$6" ("HR_ALL_ORGANIZATION_UNITS_TL".) "ORGANIZATION_ID" "HR_ALL_ORGANIZATION_UNITS_TL" "." " LANGUAGE'))
INDEX_RS_ASC (@"SALT$ F6C42A04" "HAO"@"SEL$6" ("HR_ALL_ORGANIZATION_UNITS".) "ORGANIZATION_ID")) "
INDEX (@"SALT$ F6C42A04" "MP"@"SEL$5" ("MTL_PARAMETERS".) "ORGANIZATION_ID")) "
INDEX_RS_ASC (@"SALT$ F6C42A04" "OA"@"SEL$5" ("ORG_ACCESS".) "ORGANIZATION_ID")) "
INDEX (@"SALT$ F6C42A04" "B"@"SEL$8" ("FND_APPLICATION".) "APPLICATION_ID'))"
INDEX (@"SALT$ F6C42A04" "T"@"SEL$8" ("FND_APPLICATION_TL".) "APPLICATION_ID" "FND_APPLICATION_TL" "." " LANGUAGE'))
INDEX_RS_ASC (@"SALT$ F6C42A04" "WF_LOCAL_USER_ROLES"@"SEL$12" ("WF_LOCAL_USER_ROLES".) "ROLE_ORIG_SYSTEM_ID" "WF_LOCAL_USER_ROLES" "." " ROLE_ORIG_SYSTEM'))
INDEX (@"SALT$ F6C42A04" "WURA"@"SEL$9" ("WF_USER_ROLE_ASSIGNMENTS".) "RELATIONSHIP_ID" "WF_USER_ROLE_ASSIGNMENTS" "." " USER_NAME' 'WF_USER_ROLE_ASSIGNMENTS '. "" ROLE NAME ""WF_USER_ROLE_ASSIGNMENTS. " "" START_DATE ".
'WF_USER_ROLE_ASSIGNMENTS '. (("" END_DATE "))
FULL (@"SALT$ F6C42A04" "B"@"SEL$7")
INDEX (@"SALT$ F6C42A04" "T"@"SEL$7" ("FND_RESPONSIBILITY_TL".) "APPLICATION_ID" "FND_RESPONSIBILITY_TL" "." " RESPONSIBILITY_ID' 'FND_RESPONSIBILITY_TL '. ((' ' LANGUAGE '))
LEADING (@"SALT$ F6C42A04" "FU"@"SEL$4" "HAOTL"@"SEL$6" "HAO"@"SEL$6" "MP"@"SEL$5" "OA"@"SEL$5" "B"@"SEL$8" "T"@"SEL$8" "WF_LOCAL_USER_ROLES"@"SEL$12" "WURA"@"SEL$9" "B"@"SEL$7" "T"@"SEL$7")
USE_NL (@"SALT$ F6C42A04" "HAOTL"@"SEL$6")
USE_NL (@"SALT$ F6C42A04" "HAO"@"SEL$6")
USE_NL (@"SALT$ F6C42A04" "MP"@"SEL$5")
USE_NL (@"SALT$ F6C42A04" "OA"@"SEL$5")
USE_NL (@"SALT$ F6C42A04" "B"@"SEL$8")
USE_NL (@"SALT$ F6C42A04" "T"@"SEL$8")
USE_NL (@"SALT$ F6C42A04" "WF_LOCAL_USER_ROLES"@"SEL$12")
USE_NL (@"SALT$ F6C42A04" "WURA"@"SEL$9")
USE_HASH (@"SALT$ F6C42A04" "B"@"SEL$7")
USE_NL (@"SALT$ F6C42A04" "T"@"SEL$7")
END_OUTLINE_DATA
*/
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2. ((TO_DATE (: A00,'' AAAA/MM/JJ HH24:MI:SS) filter < = NVL (TRUNC (TO_DATE (NULL)), TO_DATE (: A02, "YYYY/MM/DD HH24:MI:SS)) AND TO_DATE (: A00, ' YYYY/MM/DD HH24:MI:SS') > = NVL (TRUNC (TO_DATE (NULL)), TO_DATE (: A01,' YYYY/MM/DD))))))
HH24:MI:SS')))
10 - access("HAOTL".") LANGUAGE "= USERENV ('LANG'))"
filter ((DECODE ("HR_SECURITY". "VIEW_ALL"(), "Y", "TRUE" ", HR_SECURITY" "." " SHOW_RECORD "("HR_ALL_ORGANIZATION_UNITS","HAOTL". (("" ORGANIZATION_ID ")) = 'TRUE' AND 'HAOTL '. "LANGUAGE" = USERENV ('LANG'))) "
11 - filter("HAO".") BUSINESS_GROUP_ID "= DECODE ("HR_GENERAL"". ")" "GET_XBG_PROFILE"(), 'Y', 'HAO'." BUSINESS_GROUP_ID', 'HR_GENERAL '. "GET_BUSINESS_GROUP_ID" (())) "
12 - access("HAO".") ORGANIZATION_ID "=" HAOTL. " ("' ORGANIZATION_ID")
filter (IS NOT NULL)
14 - access("B".") RESPONSIBILITY_ID "=" OA ". ("' RESPONSIBILITY_ID")
24 - access("FU".") USER_ID «= TO_NUMBER ("FND_PROFILE".» VALUE "('USER_ID')))"
25 - access("HAOTL".") ORGANIZATION_ID ' =: B1 AND 'HAOTL'. '. LANGUAGE "= USERENV ('LANG'))"
filter (DECODE ("HR_SECURITY". "VIEW_ALL"(), "Y", "TRUE" ", HR_SECURITY" "." " SHOW_RECORD "("HR_ALL_ORGANIZATION_UNITS","HAOTL". ((("" ORGANIZATION_ID ")) = 'TRUE')
26 - filter("HAO".") BUSINESS_GROUP_ID "= DECODE ("HR_GENERAL"". ")" "GET_XBG_PROFILE"(), 'Y', 'HAO'." BUSINESS_GROUP_ID', 'HR_GENERAL '. "GET_BUSINESS_GROUP_ID" (())) "
27 - access("HAO".") ORGANIZATION_ID "(=:B1)"
filter ("HAO". "ORGANIZATION_ID"="HAOTL" "." " ORGANIZATION_ID')
28 - access("MP".") ORGANIZATION_ID "(=:B1)"
filter ("MP". "ORGANIZATION_ID"="HAO" "." " ORGANIZATION_ID')
30 - access("HAO".") ORGANIZATION_ID "=" OA ". ("' ORGANIZATION_ID")
filter ("OA". "ORGANIZATION_ID"(=:B1) "
31 - access("B".") APPLICATION_ID '="OA". ("' RESP_APPLICATION_ID")
32 - access("B".") APPLICATION_ID '=' T '. "' APPLICATION_ID ' AND 'T '. "LANGUAGE" = USERENV ('LANG')) "
35 - access ("ROLE_ORIG_SYSTEM_ID"= "OA"." RESPONSIBILITY_ID"AND"ROLE_ORIG_SYSTEM"="FND_RESP")
37 - access("WURA".") RELATIONSHIP_ID "=(-1) AND"WURA". "' USER_NAME '=' USERNAME ' AND 'WURA. ("" ROLE NAME "=" ROLE_NAME ")
filter (("WURA". "" ROLE NAME "DON'T LIKE NOT ' FND_RESP | % | ANY"AND"USER_NAME "=" WURA ". (("" USER_NAME "))
39 - access("B".") APPLICATION_ID '=' T '. "' APPLICATION_ID ' AND 'B '. "" RESPONSIBILITY_ID "=" T ". "" RESPONSIBILITY_ID "AND"T ". "LANGUAGE" = USERENV ('LANG')) "
40 filter (("MP". "ORGANIZATION_CODE"<>'OMI' AND 'MP'." ORGANIZATION_CODE' <>'001' AND 'MP '. (("' ORGANIZATION_CODE" <>' 002'))
41 - access("HAO".") ORGANIZATION_ID "=" MP ". ("' ORGANIZATION_ID")
42 filter (("HOI1". "ORG_INFORMATION1"= 'INV' AND 'HOI1'." ORG_INFORMATION2 ' = 'Y')).
43 - access("HAO".") ORGANIZATION_ID "= 'HOI1'." ORGANIZATION_ID')
filter ("HOI1". "ORG_INFORMATION_CONTEXT" | "="CLASS")"
45 - access("HAO".") ORGANIZATION_ID "= 'HOI2'." ORGANIZATION_ID')
filter ("HOI2". "ORG_INFORMATION_CONTEXT" | "="Accounting information")"
46 - filter("HOI2".") ORG_INFORMATION1 «= TO_CHAR ("GSOB".» SET_OF_BOOKS_ID'))
Thank you!
Wayne
So, I was in the middle of writing an answer both of your responses when I found my problem. I was writing how I tried to manually create a SQL profile that had the suspicion on the 10.2.0.4 WF_LOCAL_USER_ROLES contour (since this is where the suboptimal plan 11.2 spends it's time (it's using a different index)), when I noticed as the 11.2.0.4 plan accesses the WF_USER_ROLE_ASSIGNMENTS table (or index it is anyway) and the 10.2.0.4 plan does not work (it accesses WF_LOCAL_ROLES). First thought that maybe 11.2 a get rid of a useless, but then realized join the simplest answer. A view has changed. When I compared the schema objects, I only looked at tables and index, I forgot to watch the views (DOH!). It turns out that one patch interop EBS has changed the definition of one of the FND views to refer to different tables. Then, of course, 11 2 GR system cannot reproduce the plan of 10.2.
So, now I just have to treat it as a more conventional cannot change the tuning exercise code (hopefully that won't have another post here for that...)
Thanks for the reboot to my thoughts on this guy!
Wayne
-
use OPT_ESTIMATE or CARDINALITY tip for correct estimation of nested loops
I'm using Oracle 11.2.0.3. Below the execution below plan, how can I use tip OPT_ESTIMATE or CARDINALITY to teach optimization E-lines for ID 9 (Nested Loop) 30553 instead of 6.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time | A-Rows | A-Time | Buffers | OMem | 1Mem | Used-Mem | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | | | 4604 (100)| | 30553 |00:00:02.56 | 208K| | | | | 1 | SORT ORDER BY | | 1 | 6 | 7044 | 4604 (1)| 00:01:05 | 30553 |00:00:02.56 | 208K| 41M| 2086K| 36M (0)| |* 2 | HASH JOIN OUTER | | 1 | 6 | 7044 | 4603 (1)| 00:01:05 | 30553 |00:00:02.10 | 208K| 38M| 3120K| 39M (0)| |* 3 | HASH JOIN OUTER | | 1 | 6 | 6870 | 4599 (1)| 00:01:05 | 30553 |00:00:01.97 | 208K| 38M| 3120K| 39M (0)| |* 4 | HASH JOIN OUTER | | 1 | 6 | 6744 | 4591 (1)| 00:01:05 | 30553 |00:00:01.85 | 208K| 37M| 3121K| 39M (0)| |* 5 | HASH JOIN OUTER | | 1 | 6 | 6570 | 4584 (1)| 00:01:05 | 30553 |00:00:01.74 | 208K| 37M| 3121K| 38M (0)| |* 6 | HASH JOIN OUTER | | 1 | 6 | 6414 | 4576 (1)| 00:01:05 | 30553 |00:00:01.60 | 208K| 37M| 3121K| 38M (0)| | 7 | NESTED LOOPS | | 1 | | | | | 30553 |00:00:01.44 | 208K| | | | | 8 | NESTED LOOPS | | 1 | 6 | 6318 | 4572 (1)| 00:01:05 | 30553 |00:00:01.31 | 182K| | | | | 9 | NESTED LOOPS | | 1 | 6 | 1830 | 4568 (1)| 00:01:04 | 30553 |00:00:01.11 | 124K| | | | |* 10 | HASH JOIN | | 1 | 2069 | 270K| 2499 (1)| 00:00:35 | 30646 |00:00:00.46 | 23738 | 6539K| 2033K| 7965K (0)| |* 11 | TABLE ACCESS BY INDEX ROWID | DSCLR | 1 | 5079 | 158K| 533 (1)| 00:00:08 | 91395 |00:00:00.28 | 6460 | | | | | 12 | BITMAP CONVERSION TO ROWIDS | | 1 | | | | | 197K|00:00:00.16 | 615 | | | | | 13 | BITMAP AND | | 1 | | | | | 4 |00:00:00.14 | 615 | | | | | 14 | BITMAP OR | | 1 | | | | | 4 |00:00:00.07 | 276 | | | | | 15 | BITMAP CONVERSION FROM ROWIDS| | 1 | | | | | 2 |00:00:00.02 | 69 | | | | |* 16 | INDEX RANGE SCAN | XIF913DSCLR | 1 | 274K| | 14 (0)| 00:00:01 | 68407 |00:00:00.01 | 69 | | | | | 17 | BITMAP CONVERSION FROM ROWIDS| | 1 | | | | | 4 |00:00:00.05 | 207 | | | | |* 18 | INDEX RANGE SCAN | XIF913DSCLR | 1 | 274K| | 42 (0)| 00:00:01 | 209K|00:00:00.03 | 207 | | | | | 19 | BITMAP CONVERSION FROM ROWIDS | | 1 | | | | | 5 |00:00:00.06 | 339 | | | | |* 20 | INDEX RANGE SCAN | XIF910DSCLR | 1 | 274K| | 67 (0)| 00:00:01 | 239K|00:00:00.04 | 339 | | | | | 21 | NESTED LOOPS | | 1 | | | | | 21749 |00:00:00.10 | 17278 | | | | | 22 | NESTED LOOPS | | 1 | 3404 | 339K| 1965 (1)| 00:00:28 | 22772 |00:00:00.03 | 1246 | | | | | 23 | TABLE ACCESS FULL | TMP_RPT_BD_STATE_DATA_DWNLD | 1 | 3255 | 257K| 11 (0)| 00:00:01 | 3255 |00:00:00.01 | 27 | | | | |* 24 | INDEX RANGE SCAN | XIE2OCRN | 3255 | 7 | | 1 (0)| 00:00:01 | 22772 |00:00:00.03 | 1219 | | | | |* 25 | TABLE ACCESS BY INDEX ROWID | OCRN | 22772 | 1 | 21 | 1 (0)| 00:00:01 | 21749 |00:00:00.06 | 16032 | | | | |* 26 | VIEW PUSHED PREDICATE | | 30646 | 1 | 171 | 1 (0)| 00:00:01 | 30553 |00:00:00.63 | 101K| | | | | 27 | WINDOW BUFFER | | 30646 | 1 | 21 | 1 (0)| 00:00:01 | 46946 |00:00:00.59 | 101K| 2048 | 2048 | 2048 (0)| |* 28 | TABLE ACCESS BY INDEX ROWID | DSCLR_FLNG | 30646 | 1 | 21 | 1 (0)| 00:00:01 | 46946 |00:00:00.32 | 101K| | | | |* 29 | INDEX RANGE SCAN | XIE1DSCLR_FLNG | 30646 | 2 | | 1 (0)| 00:00:01 | 46946 |00:00:00.21 | 59862 | | | | |* 30 | INDEX RANGE SCAN | XPKH760_RGLTY_ACTN_DSCLR | 30553 | 1 | | 1 (0)| 00:00:01 | 30553 |00:00:00.18 | 57541 | | | | | 31 | TABLE ACCESS BY INDEX ROWID | H760_RGLTY_ACTN_DSCLR | 30553 | 1 | 748 | 1 (0)| 00:00:01 | 30553 |00:00:00.11 | 26218 | | | | | 32 | TABLE ACCESS FULL | DSCLR_ST_TYPE_TBL | 1 | 4 | 64 | 4 (0)| 00:00:01 | 4 |00:00:00.01 | 5 | | | | | 33 | TABLE ACCESS FULL | RGLTY_RSLTN_TYPE_TBL | 1 | 12 | 312 | 7 (0)| 00:00:01 | 12 |00:00:00.01 | 10 | | | | | 34 | TABLE ACCESS FULL | INTTR_TYPE_TBL | 1 | 14 | 406 | 7 (0)| 00:00:01 | 14 |00:00:00.01 | 10 | | | | | 35 | TABLE ACCESS FULL | SNCTN_TYPE_TBL | 1 | 15 | 315 | 7 (0)| 00:00:01 | 15 |00:00:00.01 | 10 | | | | | 36 | TABLE ACCESS FULL | PRDCT_TYPE_TBL | 1 | 25 | 725 | 4 (0)| 00:00:01 | 25 |00:00:00.01 | 5 | | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Query Block Name / Object Alias (identified by operation id): ------------------------------------------------------------- 1 - SEL$A8B7A3F4 11 - SEL$A8B7A3F4 / D@SEL$13 23 - SEL$A8B7A3F4 / OH@SEL$1 24 - SEL$A8B7A3F4 / O@SEL$13 25 - SEL$A8B7A3F4 / O@SEL$13 26 - SEL$13512960 / DF@SEL$13 27 - SEL$13512960 28 - SEL$13512960 / DF1@SEL$14 29 - SEL$13512960 / DF1@SEL$14 30 - SEL$A8B7A3F4 / H7@SEL$2 31 - SEL$A8B7A3F4 / H7@SEL$2 32 - SEL$A8B7A3F4 / DS@SEL$9 33 - SEL$A8B7A3F4 / RST@SEL$11 34 - SEL$A8B7A3F4 / ITT@SEL$3 35 - SEL$A8B7A3F4 / ST@SEL$5 36 - SEL$A8B7A3F4 / PT@SEL$7 Outline Data ------------- /*+ BEGIN_OUTLINE_DATA IGNORE_OPTIM_EMBEDDED_HINTS OPTIMIZER_FEATURES_ENABLE('11.2.0.3') DB_VERSION('11.2.0.3') OPT_PARAM('optimizer_index_cost_adj' 20) ALL_ROWS OUTLINE_LEAF(@"SEL$13512960") PUSH_PRED(@"SEL$A8B7A3F4" "DF"@"SEL$13" 11) OUTLINE_LEAF(@"SEL$A8B7A3F4") ELIMINATE_JOIN(@"SEL$2D47CDEA" "DTT"@"SEL$13") OUTLINE(@"SEL$14") OUTLINE(@"SEL$A8B7A3F4") ELIMINATE_JOIN(@"SEL$2D47CDEA" "DTT"@"SEL$13") OUTLINE(@"SEL$2D47CDEA") MERGE(@"SEL$3FAACB6D") OUTLINE(@"SEL$15") OUTLINE(@"SEL$3FAACB6D") MERGE(@"SEL$11") MERGE(@"SEL$A1A6E401") OUTLINE(@"SEL$12") OUTLINE(@"SEL$11") OUTLINE(@"SEL$A1A6E401") MERGE(@"SEL$9") MERGE(@"SEL$BFB1842A") OUTLINE(@"SEL$10") OUTLINE(@"SEL$9") OUTLINE(@"SEL$BFB1842A") MERGE(@"SEL$7") MERGE(@"SEL$EEDE2B8C") OUTLINE(@"SEL$8") OUTLINE(@"SEL$7") OUTLINE(@"SEL$EEDE2B8C") MERGE(@"SEL$5") MERGE(@"SEL$A6B38458") OUTLINE(@"SEL$6") OUTLINE(@"SEL$5") OUTLINE(@"SEL$A6B38458") MERGE(@"SEL$171BE69E") MERGE(@"SEL$3") OUTLINE(@"SEL$4") OUTLINE(@"SEL$171BE69E") MERGE(@"SEL$AF02BF1E") OUTLINE(@"SEL$3") OUTLINE(@"SEL$2") OUTLINE(@"SEL$AF02BF1E") MERGE(@"SEL$13") OUTLINE(@"SEL$1") OUTLINE(@"SEL$13") FULL(@"SEL$A8B7A3F4" "OH"@"SEL$1") INDEX(@"SEL$A8B7A3F4" "O"@"SEL$13" ("OCRN"."ORG_PK" "OCRN"."DSCLR_DSCLB_FL" "OCRN"."DSCLR_RPTBL_FL")) BITMAP_TREE(@"SEL$A8B7A3F4" "D"@"SEL$13" AND(OR(1 1 ("DSCLR"."FORM_TYPE_CD") 2 ("DSCLR"."FORM_TYPE_CD")) ("DSCLR"."DSCLR_TYPE_CD"))) NO_ACCESS(@"SEL$A8B7A3F4" "DF"@"SEL$13") INDEX(@"SEL$A8B7A3F4" "H7"@"SEL$2" ("H760_RGLTY_ACTN_DSCLR"."FLNG_PK" "H760_RGLTY_ACTN_DSCLR"."DSCLR_PK" "H760_RGLTY_ACTN_DSCLR"."REC_SEQ_NB")) FULL(@"SEL$A8B7A3F4" "DS"@"SEL$9") FULL(@"SEL$A8B7A3F4" "RST"@"SEL$11") FULL(@"SEL$A8B7A3F4" "ITT"@"SEL$3") FULL(@"SEL$A8B7A3F4" "ST"@"SEL$5") FULL(@"SEL$A8B7A3F4" "PT"@"SEL$7") LEADING(@"SEL$A8B7A3F4" "OH"@"SEL$1" "O"@"SEL$13" "D"@"SEL$13" "DF"@"SEL$13" "H7"@"SEL$2" "DS"@"SEL$9" "RST"@"SEL$11" "ITT"@"SEL$3" "ST"@"SEL$5" "PT"@"SEL$7") USE_NL(@"SEL$A8B7A3F4" "O"@"SEL$13") NLJ_BATCHING(@"SEL$A8B7A3F4" "O"@"SEL$13") USE_HASH(@"SEL$A8B7A3F4" "D"@"SEL$13") USE_NL(@"SEL$A8B7A3F4" "DF"@"SEL$13") USE_NL(@"SEL$A8B7A3F4" "H7"@"SEL$2") NLJ_BATCHING(@"SEL$A8B7A3F4" "H7"@"SEL$2") USE_HASH(@"SEL$A8B7A3F4" "DS"@"SEL$9") USE_HASH(@"SEL$A8B7A3F4" "RST"@"SEL$11") USE_HASH(@"SEL$A8B7A3F4" "ITT"@"SEL$3") USE_HASH(@"SEL$A8B7A3F4" "ST"@"SEL$5") USE_HASH(@"SEL$A8B7A3F4" "PT"@"SEL$7") SWAP_JOIN_INPUTS(@"SEL$A8B7A3F4" "D"@"SEL$13") INDEX_RS_ASC(@"SEL$13512960" "DF1"@"SEL$14" ("DSCLR_FLNG"."DSCLR_PK" "DSCLR_FLNG"."BLLBL_FL")) END_OUTLINE_DATA */
This plan gives you an idea of why your initial synchronization has been long - most of your readings are one-piece readings and you have read 53 724 blocks. If you estimate 1 centisecond by read (which could be on a reasonable charge system) then it is 537 seconds. to 5 milliseconds per read, it's still 268 seconds or 4 minutes and 30 seconds.
A quick break down of some (the worst case) potential time - only you can say whether or not some of these readings will be always/often/never being cached in the file or at the SAN level.
Line 11 - physical reads 6 400 done - it's a tree bitmap then the readings are in the order of physical table with no. rereads. Call 5ms by read-online 32 seconds. L
| * 11 | TABLE ACCESS BY INDEX ROWID | DSCLR | 1. 5079. 158K | 533 (1) | 00:00:08 | 91395 | 00:00:01.27 | 6460. 6400 | | | |
The hash join takes us from 6 400 to 11 788 because it joins, lines 21 to 25 (nested loop) in which most of the work is the random access table with some automatic caching: 26 seconds. Do a search here rather than indexed 22 000 access? Which would be faster, which would charge less.
| * 25. TABLE ACCESS BY INDEX ROWID | OCRN | 22050. 1. 21. 1 (0) | 00:00:01 | 21059 | 00:01:04.74 | 15634 | 5280. | | |
Three nested loops that introduce more readings:
11788 9-> 26386:14 600 of the predicate view pushed which some lies but a very large index and a table of random access 73 seconds
8 26386-> 33783:7 400 index line 30 - big clue about 37 seconds Access hides
33783 7-> 53691:19 900 31 table access - large table line, not much caching, 100 seconds.
In each case, you can ask if an analysis would take less time than all of these random reads.
NOTE - all I'm pointing our here where you potentially use a lot of time so that you can ask whether or not you should do little of the query in this way, or if there is an alternative, or if the work you're doing is absolutely necessary. If you want to optimize the query you should consider the intent of the query and think your way through a reasonable join order to see if you can imagine an effective way to get the same data. I have written a few articles and presentation on an approach that begins by drawing - here is a link to an article I wrote for a group of SQL Server: https://www.simple-talk.com/sql/performance/designing-efficient-sql-a-visual-approach/
and a video I did with Kyle Hailey, while he was working for Embarcadero:Tune in for the ultimate SQL Tune-off | Landing pages
Concerning
Jonathan Lewis
-
Size of partition using Bloom filters
Hello
Oracle EE 11.2.0.4, Exadata
Below is a very simple test query:
explain plan for
Select * from t1
where (c1, c2) in
(select c1, c2 from gtt_t2);
We have two very similar patterns, these two objects. We copy the stats on patterns, so that all objects have the same characteristics.
However, for partitioned tables, we copy the same statistics on each partition. For this reason, global statistics for partitioned tables and indexes can be different.
T1 is a table with secondary partitions and GTT_T2 is a global temporary table.
The plan on a single schema is:
------------------------------------------------------------+-----------------------------------+---------------+
| ID | Operation | Name | Lines | Bytes | Cost | Time | Pstart. Pstop |
------------------------------------------------------------+-----------------------------------+---------------+
| 0 | SELECT STATEMENT | | | | 42 M | | | |
| 1 | HASH JOIN RIGHT SEMI | | 502K | 457 M | 42 M | 12:21:34 | | |
| 2 | JOIN FILTER PART CREATE |: BF0000 | 1. 119. 2. 00:00:01 | | |
| 3 | STORE TABLE FULL ACCESS | GTT_T2 | 1. 119. 2. 00:00:01 | | |
| 4 | RANGE OF PARTITION ALL THE | | 1421M | 1128G | 42 M | 12:19:26 | 1 | 247.
| 5 | PARTITION - HASH JOIN FILTER | | 1421M | 1128G | 42 M | 12:19:26 :: BF0000:: BF0000:
| 6 | STORE TABLE FULL ACCESS | T1 | 1421M | 1128G | 42 M | 12:19:26 | 1 | 1976 |
------------------------------------------------------------+-----------------------------------+---------------+
Whereas the plan on the other schema is:
------------------------------------------------------------+-----------------------------------+---------------+
| ID | Operation | Name | Lines | Bytes | Cost | Time | Pstart. Pstop |
------------------------------------------------------------+-----------------------------------+---------------+
| 0 | SELECT STATEMENT | | | | 268 M | | | |
| 1 | HASH JOIN RIGHT SEMI | | 3174K | 2889M | 268 M | 78:02:36 | | |
| 2 | STORE TABLE FULL ACCESS | GTT_T2 | 1. 119. 2. 00:00:01 | | |
| 3 | RANGE OF PARTITION ALL THE | | 8980M | 7129G | 267 M | 78:54:28 | 1 | 1561.
| 4 | HASH PARTITION ALL | | 8980M | 7129G | 267 M | 78:54:28 | 1 | LAST |
| 5 | STORE TABLE FULL ACCESS | T1 | 8980M | 7129G | 267 M | 78:54:28 | 1 | 7924 |
------------------------------------------------------------+-----------------------------------+---------------+
As you can see the size of bloom filter based partition appears in a single plan, but he does not appear in the other plan.
I couldn't do anything 10053 trace. For me it's not not obvious in the trace where CBO decides to use the bloom filter.
Where two questions:
-How CBO decides to use the size of bloom filter based partition?
-How to force the filter based bloom the size of partition?
Thank you very much.
As a starting point, check the settings to turn the feature off. A fast would be to use the 'Preview' of dbms_xplan calling to see if it produces advice opt_param. (And perhaps optimizer_features_enable was put back for the non-Bloom instance).
A quick estimate to study the case - could be related to the fact that the number of subparts of hash is not the same for each partition? Or perhaps because some scores are only one of the partitions.
Concerning
Jonathan Lewis
-
Problem with DBMS_INDEX_UTL. BUILD_TABLE_INDEXES
We have Oracle 11.2.0.3.0 and optimizer_features_enable = 11.2.0.3.1 in IBM AIX 7.1. I know that this DBMS_INDEX_UTL is "undocumented" (even undocumented?). There are some units of program written by programmers using it. They employ something like
BEGIN
DBMS_INDEX_UTL. BUILD_TABLE_INDEXES
(LIST = > 'TABLE_1, TABLE_2,)
JUST_UNUSABLE = > TRUE,
LOCATION = > "ALL."
SIMULTANEOUS = > TRUE,
MAX_SLAVES = > 5
);
END;
It was working fine and suddenly stopped working. This means that he has to wait on 'get pipe' for an infinite time. The only change in the database is that we have enabled the registration of the force. Anyone know this situation?
NOTE: A formal SR was brought to Oracle to know their point of view (supported or not etc).
This isn't a good idea to use an undocumented feature. Undocumented features are there for oracle internal use.
1. these devices may not be backward compatible.
2. they may disappear in future versions.
3 behavior are not predictable, because oracle does not say what it does. If you think X, but it'd do X, Y and Z.
> A formal SR was brought to Oracle to know their point of view (supported or not etc).
I'm sure they recommend is not to use the undocumented feature.
-
I created a copy of test of production for a long time, when I was creating the test I have not activated AMM.
A developer created a new report and told me that it took seconds to run on the Pb test, as he was taking up to 10 minutes on the Pb of the production. I got it to extract the SQL code for the report and he ran from a command line, and on the Pb test, it took 5 seconds and more than 5 minutes on the Pb of the production.
I then checked the AMM with the show memory_target parameter to see if AMM was activated and on the Pb of the prod is 1 GB on the DB test is 0
memory allocation requests show this for prod:
NAME VALUE
------------------------------ ----------
PGA maximum allowed 578929664
pga_aggregate_target 0
SGA_TARGET 0
MEMORY_TARGET
-------------
578929664
for the BP to test:
NAME VALUE
------------------------------ ----------
PGA maximum allowed 214604800
pga_aggregate_target 101711872
SGA_TARGET 624951296
MEMORY_TARGET
-------------
839556096
I have not dbcontrol currently enabled on the Pb test, so I could not watch the advisors of the memory, but it is enabled on the Pb of the prod, that tells me it should be to the 1 GB is currently at.
Two of these db are on the same server.
Now I wonder if I should disable the AMM on the prod server and allocate manually to match the test, or should I change the AMM if possible so that it can perform as good as the Pb of test?
Thanks in advance.
I tried the suggestion of Geert earlier but I forgot to mention that it made no difference.
However, I managed to find out what it is, starting at the beginning by looking at all the init parameters. It was then that I noticed the Prod OPTIMIZER_FEATURES_ENABLE was set to 9.2.0.8, while the test was 11.2.0.3, a quick alter system set optimizer_features_enable = '11.2.0.3' scope = both and the query ran<5 seconds,="" just="" like="" the="" test.="" it="" also="" got="" rid="" of="" the="" note="" that="" the="" cpu="" costing="" was="" not="">5>
I thought a bit more wording accurate in the order note explain plan could be useful - but in any case, it makes sense, I guess...
However, this has been a useful exercise for me, I have a better idea how they use the remote database for retrieving information and will make suggestions, it may be easier to create views of the side remote (SQL Server), rather than on the side of the Oracle.
Still do not know how the test done with the right parameter and the prod has not, I used to create the init.ora file to create the test instance by getting a carbon copy of the production spfile, but I missed this setting this time.
In any case, it's a good thing I had the right parameter under test - otherwise the Developer & users may have accepted, he was going to be a slow and left...
Thanks again for all your help
PS. Now here is the plan explain of production:
SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST')); SQL_ID bqh1aq71rshpp, child number 1 ------------------------------------- SELECT /*+ GATHER_PLAN_STATISTICS */ DOMCUST.CUSTOMER,DOMHEADER.WOODTYPE,DOMHEADER.ISSUEDATE ISSUEDATE, vw_testlots.TLOT_PREV PREV_LOT, VW_TESTLOTS.TLOT_NEXT NEXT_LOT, DOMLOTS.lotno ship_lot, VW_PTMS_LOTS.AIRDRY AIRDRY,VW_PTMS_LOTS.BRIGHTNESS BRIGHT,VW_PTMS_LOTS.DIRT DIRT,VW_PTMS_LOTS.VISCOSITY VISCOSITY, (A.CCSF_0+B.CCSF_0)/2 CCSF_0, (A.TEAR1_0+B.TEAR1_0)/2 TEAR1_0, (A.BL_0+B.BL_0)/2 BL_0, (A.BURST_0+B.BURST_0)/2 BURST_0, (A.BULK_0+B.BULK_0)/2 BULK_0, (A.POROSITY_0+B.POROSITY_0)/2 POROSITY_0, (A.BOND_0+B.BOND_0)/2 BOND_0, (A.OPACITY_0+B.OPACITY_0)/2 OPACITY_0, (A.CCSF_1+B.CCSF_1)/2 CCSF_400, (A.TEAR1_1+B.TEAR1_1)/2 TEAR1_400, ( Plan hash value: 2207188603 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads | Writes | OMem | 1Mem | Used-Mem | Used-Tmp| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | | 255 |00:00:05.90 | 1091K| 45 | 45 | | | | | | 1 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.91 | 385K| 0 | 0 | | | | | |* 2 | FILTER | | 255 | | 57880 |00:00:01.11 | 385K| 0 | 0 | | | | | |* 3 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 57880 |00:00:00.99 | 385K| 0 | 0 | | | | | |* 4 | INDEX RANGE SCAN | UK_LOTNO | 255 | 45 | 767K|00:00:00.85 | 5015 | 0 | 0 | | | | | | 5 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.52 | 158K| 0 | 0 | | | | | |* 6 | FILTER | | 255 | | 55792 |00:00:00.47 | 158K| 0 | 0 | | | | | |* 7 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 55792 |00:00:00.36 | 158K| 0 | 0 | | | | | |* 8 | INDEX RANGE SCAN | UK_LOTNO | 255 | 45 | 516K|00:00:00.55 | 1372 | 0 | 0 | | | | | | 9 | SORT ORDER BY | | 1 | 1 | 255 |00:00:05.90 | 1091K| 45 | 45 | 70656 | 70656 |63488 (0)| | | 10 | NESTED LOOPS | | 1 | | 255 |00:00:04.47 | 547K| 45 | 45 | | | | | | 11 | NESTED LOOPS | | 1 | 1 | 255 |00:00:04.47 | 546K| 45 | 45 | | | | | | 12 | NESTED LOOPS | | 1 | 1 | 255 |00:00:03.88 | 383K| 45 | 45 | | | | | | 13 | NESTED LOOPS | | 1 | 1 | 255 |00:00:03.02 | 979 | 45 | 45 | | | | | | 14 | NESTED LOOPS | | 1 | 1 | 255 |00:00:03.01 | 712 | 45 | 45 | | | | | |* 15 | HASH JOIN | | 1 | 1 | 255 |00:00:03.01 | 527 | 45 | 45 | 858K| 858K| 1283K (0)| | | 16 | NESTED LOOPS | | 1 | 19 | 255 |00:00:00.01 | 28 | 0 | 0 | | | | | | 17 | NESTED LOOPS | | 1 | 1 | 9 |00:00:00.01 | 17 | 0 | 0 | | | | | | 18 | TABLE ACCESS BY INDEX ROWID | DOMCUST | 1 | 1 | 1 |00:00:00.01 | 2 | 0 | 0 | | | | | |* 19 | INDEX UNIQUE SCAN | PK_DOMCUST | 1 | 1 | 1 |00:00:00.01 | 1 | 0 | 0 | | | | | |* 20 | TABLE ACCESS FULL | DOMHEADER | 1 | 1 | 9 |00:00:00.01 | 15 | 0 | 0 | | | | | |* 21 | INDEX RANGE SCAN | PK_DOMLOTS | 9 | 21 | 255 |00:00:00.01 | 11 | 0 | 0 | | | | | | 22 | VIEW | VW_PTMS_LOTS | 1 | 101 | 15101 |00:00:03.05 | 499 | 45 | 45 | | | | | | 23 | SORT UNIQUE | | 1 | 101 | 15101 |00:00:03.02 | 499 | 45 | 45 | 1328K| 587K| 1180K (0)| | | 24 | UNION-ALL | | 1 | | 15101 |00:00:03.06 | 499 | 45 | 45 | | | | | | 25 | HASH GROUP BY | | 1 | 100 | 15101 |00:00:02.98 | 0 | 45 | 45 | 3004K| 982K| 3262K (1)| 1024 | |* 26 | FILTER | | 1 | 100 | 15842 |00:00:02.99 | 0 | 0 | 0 | | | | | | 27 | REMOTE | | 1 | | 16563 |00:00:02.95 | 0 | 0 | 0 | | | | | |* 28 | TABLE ACCESS FULL | PTMSLOTS | 1 | 1 | 0 |00:00:00.01 | 499 | 0 | 0 | | | | | |* 29 | INDEX UNIQUE SCAN | PK_DOMLOTS | 255 | 1 | 255 |00:00:00.01 | 185 | 0 | 0 | | | | | | 30 | TABLE ACCESS BY INDEX ROWID | DOMHEADER | 255 | 1 | 255 |00:00:00.01 | 267 | 0 | 0 | | | | | |* 31 | INDEX UNIQUE SCAN | PK_DOMHEADER | 255 | 1 | 255 |00:00:00.01 | 12 | 0 | 0 | | | | | | 32 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 255 |00:00:00.91 | 383K| 0 | 0 | | | | | |* 33 | INDEX UNIQUE SCAN | PK_LOTTEST | 255 | 1 | 255 |00:00:00.91 | 382K| 0 | 0 | | | | | | 34 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.91 | 382K| 0 | 0 | | | | | | 35 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 261 |00:00:00.90 | 382K| 0 | 0 | | | | | |* 36 | INDEX RANGE SCAN | UK_LOTNO | 255 | 1 | 261 |00:00:00.90 | 382K| 0 | 0 | | | | | | 37 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.90 | 382K| 0 | 0 | | | | | |* 38 | FILTER | | 255 | | 57880 |00:00:01.09 | 382K| 0 | 0 | | | | | |* 39 | TABLE ACCESS BY INDEX ROWID| LOTTEST | 255 | 1 | 57880 |00:00:00.97 | 382K| 0 | 0 | | | | | |* 40 | INDEX RANGE SCAN | UK_LOTNO | 255 | 45 | 767K|00:00:00.85 | 1798 | 0 | 0 | | | | | |* 41 | INDEX UNIQUE SCAN | PK_LOTTEST | 255 | 1 | 255 |00:00:00.53 | 162K| 0 | 0 | | | | | | 42 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.53 | 162K| 0 | 0 | | | | | | 43 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 264 |00:00:00.52 | 162K| 0 | 0 | | | | | |* 44 | INDEX RANGE SCAN | UK_LOTNO | 255 | 1 | 264 |00:00:00.52 | 162K| 0 | 0 | | | | | | 45 | SORT AGGREGATE | | 255 | 1 | 255 |00:00:00.52 | 162K| 0 | 0 | | | | | |* 46 | FILTER | | 255 | | 55792 |00:00:00.46 | 162K| 0 | 0 | | | | | |* 47 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 55792 |00:00:00.35 | 162K| 0 | 0 | | | | | |* 48 | INDEX RANGE SCAN | UK_LOTNO | 255 | 45 | 516K|00:00:00.57 | 5282 | 0 | 0 | | | | | | 49 | TABLE ACCESS BY INDEX ROWID | LOTTEST | 255 | 1 | 255 |00:00:00.01 | 255 | 0 | 0 | | | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter(:B1-365<=:B2+365) 3 - filter(("WOODTYPE"=:B1 AND "PRODDATE">=:B2-365 AND "PRODDATE"<=:B3+365)) 4 - access("LOTNO"<:B1) 6 - filter(:B1-365<=:B2+365) 7 - filter(("WOODTYPE"=:B1 AND "PRODDATE">=:B2-365 AND "PRODDATE"<=:B3+365)) 8 - access("LOTNO">=:B1) 15 - access("DOMLOTS"."LOTNO"="VW_PTMS_LOTS"."LOTID") 19 - access("DOMCUST"."DOMCUSTID"=1) 20 - filter(("DOMHEADER"."DOMCUSTID"=1 AND "DOMHEADER"."ISSUEDATE">=TO_DATE(' 2014-05-30 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "DOMHEADER"."WOODTYPE"='H' AND TRUNC(INTERNAL_FUNCTION("DOMHEADER"."ISSUEDATE"))<=TO_DATE(' 2015-05-30 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) 21 - access("DOMHEADER"."DOMID"="DOMLOTS"."DOMID") 26 - filter("A"."StartTime">GREATEST(SYSDATE@!-730,TO_DATE(' 2013-04-16 13:00:00', 'syyyy-mm-dd hh24:mi:ss'))) 28 - filter("PRODTIME">SYSDATE@!-730) 29 - access("DOMHEADER"."DOMID"="DOMLOTS"."DOMID" AND "DOMLOTS"."LOTNO"="DOMLOTS"."LOTNO") 31 - access("DOMLOTS"."DOMID"="DOMHEADER"."DOMID") 33 - access("A"."LOTID"=) 36 - access("LOTTEST"."LOTNO"=) 38 - filter(:B1-365<=:B2+365) 39 - filter(("WOODTYPE"=:B1 AND "PRODDATE">=:B2-365 AND "PRODDATE"<=:B3+365)) 40 - access("LOTNO"<:B1) 41 - access("B"."LOTID"=) 44 - access("LOTTEST"."LOTNO"=) 46 - filter(:B1-365<=:B2+365) 47 - filter(("WOODTYPE"=:B1 AND "PRODDATE">=:B2-365 AND "PRODDATE"<=:B3+365)) 48 - access("LOTNO">=:B1) 105 rows selected. Elapsed: 00:00:00.12
-
Bad result in a left outer join in 12.1.0.2
Hallo,
We discovered a strange behaviour in a query. The query provides values in a column of outer join where there is no corresponding value in the table is attached to the outside.
When you expand this request by the "ORDER BY" then this query gives the correct result.
Example:
SQL > desc tb_a
Name Null? Typ
-------------------------------------------- ----------------------------
ID NOT NULL NUMBER (19)SQL > desc tb_b
Name Null? Typ
-------------------------------------------- ----------------------------
CLOSED NOT NULL NUMBER (1)
ID NOT NULL NUMBER (19)CCS_APPLICATION@icw01> select * from tb_a where id in (4148,4141,4195);
ID
----------
4148
4141
4195CCS_APPLICATION@icw01> select * from tb_b where id in (4148,4141,4195);
INTERNAL ID
---------- ----------
4148 0CCS_APPLICATION@icw01> SELECT
2 b.id AS b_id,
3 a.id AS a_id,
4 b.closed AS b_closed
5
6 tb_a a
7 LEFT OUTER JOIN tb_b b ON a.id = b.id
8 WHERE a.id IN (4148, 4195, 4141)
9 ORDER BY ASC a.id
10;B_ID ALLOCATION A_ID B_CLOSED
---------- ---------- ----------
4141
4148 4148 0
4195CCS_APPLICATION@icw01> SELECT
2 b.id AS b_id,
3 a.id AS a_id,
4 b.closed AS b_closed
5
6 tb_a a
7 LEFT OUTER JOIN tb_b b ON a.id = b.id
8 WHERE a.id IN (4148, 4195, 4141)
9 - ORDER BY ASC a.id
10;B_ID ALLOCATION A_ID B_CLOSED
---------- ---------- ----------
4148 4148 0
4141 4141
4195 4195instance parameter:
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
compatible string 12.1.0.2.0
optimizer_features_enable string 12.1.0.2
After ""alter system set optimizer_features_enable = ' 11.2.0.4 ';" the query provides the correct result in both cases (ordered and unordered).
Now the final question: is this a bug?
1480970 wrote:
Hallo! Yes, I searched the Support of Oracle. I found some similar entries, but not an exact match. To fix some issues
with 12.1.0.2.
There is another interesting clue when look you on the execution plan:
Note
-----
-the dynamic statistics used: dynamic sampling (level = 2)
- This is an adaptation plan
We have disabled (= FALSE) optimizer_adaptive_features and the query provides the correct values.
This could be a solution for us.
Looks like a pretty tight match for bug 18430870, even if it affects the two 12.1.0.1 and 12.1.0.2, which contradicts the Martin trial against 12.1.0.1.
The description of the bug mentions disabling "_projection_pushdown" (set to false) should also be a viable solution, perhaps if you want to give that a try and see if it is a different bug or not.
There are also a number of one-time fixes already available for download, maybe your version / platform is already covered, if the bug applies.
Randolf
Maybe you are looking for
-
Satellite R830-143 - update of the BIOS does not support this operating system
Hello I received a notification via Tempro that he did not have a BIOS upgrade. I downloaded the ZIP file (bios - 20120209125153.zip), extract the package (BIOS360_EC140_WIN.exe) and ran it according to the instructions. The package runs, give the pr
-
Nb505 shuts off when I remove the charger
for some reason any my Toshiba netbook mb505 turns off when I remove the AC adapter / charger netbook. I can go on the netbook when its plugged in. I also see that the charger is plugged and not to charge and is 99%. If anyone can help it would be ap
-
ENVY of HP Touchsmart m6 sleekboo: FAILURE ID: 9g860c-70a7q5-xd7wwk-618j03
I can do to correct this defect?
-
When I click to open the program, "Qur'an Autoreciter" I get error 80004005
Error H8ooo4005 (-2147467259) & system. Unspecified error
-
clock battery/slimline s5220f
I need to replace the nickel battery size in my ' puter. My first attempt to do exactly that brought me here, I'll need a little guidance. for example: how the old one is deleted? as I understood it, it sort of 'freaked out', but when I'm actually f