Oracle Tips and Tricks — David Fitzjarrell

July 28, 2015

It Isn’t The Index

Filed under: Indexes — dfitzjarrell @ 15:36

"If you want sense, you'll have to make it yourself."
- Norton Juster, The Phantom Tollbooth

One of the more confusing statistics in Oracle is, apparently, one called the clustering factor. Associated with an index (as evidenced by the columns in DBA_INDEXES) it’s actually dependent on the table data, more specifically the distance between ‘jumps’ for a given index key. Let’s define a ‘jump’ to be the number of blocks between rows containing the given index key starting with the first block found containing that key. That’s confusing but don’t despair, this will be explained in detail.

Oracle, in its infinite wisdom, computes a clustring factor for an index based upon the key value and the scattering of the rows containing that key across the table data. Looking at a simple example let’s look at a simple non-unique index (indexes for which the clustering factor matters) and the associated table data. The example starts by building the table and loading the data:


SQL> 
SQL> create table clust_fact(
  2  	     id      number,
  3  	     nm      varchar2(40),
  4  	     dt      date,
  5  	     sq      number);

Table created.

SQL> 
SQL> begin
  2  	     for i in 1..1000000 loop
  3  		     insert into clust_fact(id,nm,dt,sq)
  4  		     values(mod(i,77), 'Record '||i, sysdate - mod(i, 77), i);
  5  	     end loop;
  6  
  7  	     commit;
  8  end;
  9  /

PL/SQL procedure successfully completed.

SQL> 

Next, build the index and generate the statistics:


SQL>
SQL> create index clust_fact_idx on clust_fact(id);

Index created.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'CLUST_FACT', cascade=>true);

PL/SQL procedure successfully completed.

SQL> 

Query the clustering factor computed by Oracle:


SQL> select index_name, clustering_factor
  2  from user_indexes
  3  where table_name = 'CLUST_FACT';

INDEX_NAME                     CLUSTERING_FACTOR                                                                                    
------------------------------ -----------------                                                                                    
CLUST_FACT_IDX                            370731                                                                                    

SQL> 

The clustering factor provides a representation of how far Oracle needs to ‘jump’, on average, between blocks containing the index key value. To understand this a bit better let’s look at the code Oracle actually uses to compute the clustering factor and explain what it does:


SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 

Oracle uses a function named sys_op_countchg, which takes two parameters, the first 15 bytes of the rowid and the number of blocks to traverse to trigger the count to increase; by default Oracle chooses to increment the clustering factor counter every time the block address changes. If three rows, for example, exist in the current block the counter does not increment; if the next three rows are in a different block the counter is incremented by 1 (Oracle doesn’t change blocks for the next two reads after the change). This keeps going througout the table to compute the final clustering factor. Knowing the function used by Oracle and its parameters it is possible to modify the call to accept larger values for the number of block changes before the clustering factor counter is incremented. To allow Oracle to consider 3 blocks ‘close enough’ to not change the counter the query is modified as follows:


SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 

Given how the values were computed for the ID column the clustering factor doesn’t change when we increase the block change count Oracle considers to be within range of the starting block address. Possible values for this second parameter are 1, 3, 5, 9 and 16. Going through the list of possible values it’s obvious with the current data loading the clustering factor won’t improve no matter which value we choose:


SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 

Since how the table data is ordered affects the clustering factor the table is reloaded with data ordered using the ID column:


SQL> 
SQL> create table clust_tmp as select * from clust_fact order by id;

Table created.

SQL> 
SQL> truncate table clust_fact;

Table truncated.

SQL> 
SQL> insert into clust_fact select * from clust_tmp;

1000000 rows created.

SQL> 
SQL> commit;

Commit complete.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'CLUST_FACT', cascade=>true);

PL/SQL procedure successfully completed.

SQL> 

Querying the clustering factor reveals it has significantly decreased since the keys are much closer together:


SQL> 
SQL> select index_name, clustering_factor
  2  from user_indexes
  3  where table_name = 'CLUST_FACT';

INDEX_NAME                     CLUSTERING_FACTOR                                                                                    
------------------------------ -----------------                                                                                    
CLUST_FACT_IDX                              4889                                                                                    

SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4888                                                                                                                          

SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4888                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4885                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4881                                                                                                                          

SQL> 

It is worth noting that the clustering factor slightly decreases with larger values for the number of blocks Oracle can skip before updating the change count. The changes are not huge, and only differ by 8 from the value Oracle calculates by default to setting the ‘blocks to skip’ parameter to 16, its highest possible value. Since the original load created the SQ values in sequence the table is reloaded with the SQ values in order and a new concatenated index using both the ID and SQ columns is created. This is done to show how the clustering factor behaves for other indexes when it’s ‘optimized’ for one index:


SQL> 
SQL> drop table clust_tmp purge;

Table dropped.

SQL> 
SQL> create table clust_tmp as select * from clust_fact order by sq;

Table created.

SQL> 
SQL> truncate table clust_fact;

Table truncated.

SQL> 
SQL> insert into clust_fact select * from clust_tmp;

1000000 rows created.

SQL> 
SQL> commit;

Commit complete.

SQL> 
SQL> create index clust_fact_idx2 on clust_fact(id, sq);

Index created.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'CLUST_FACT', cascade=>true);

PL/SQL procedure successfully completed.

SQL> 

Querying the clustering factor the value for the original table load again appears and, again, doesn’t change even when the block skip parameter to the sys_op_countchg function is increased through the available values:


SQL> 
SQL> select index_name, clustering_factor
  2  from user_indexes
  3  where table_name = 'CLUST_FACT';

INDEX_NAME                     CLUSTERING_FACTOR                                                                                    
------------------------------ -----------------                                                                                    
CLUST_FACT_IDX2                           370731                                                                                    
CLUST_FACT_IDX                            370731                                                                                    

SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    370731                                                                                                                          

SQL> 

Ordering the data by ID shows that for both indexes the clustering factor decreases, since the indexes both include the ID column. The presence of the SQ column causes the second index clustering factor to be greater when the default parameters are used; interestingly as the block skip count increases for the second index the clustering factor decreases to that of the single-column index:


SQL> 
SQL> drop table clust_tmp purge;

Table dropped.

SQL> 
SQL> create table clust_tmp as select * from clust_fact order by id;

Table created.

SQL> 
SQL> truncate table clust_fact;

Table truncated.

SQL> 
SQL> insert into clust_fact select * from clust_tmp;

1000000 rows created.

SQL> 
SQL> commit;

Commit complete.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'CLUST_FACT', cascade=>true);

PL/SQL procedure successfully completed.

SQL> 
SQL> select index_name, clustering_factor
  2  from user_indexes
  3  where table_name = 'CLUST_FACT';

INDEX_NAME                     CLUSTERING_FACTOR                                                                                    
------------------------------ -----------------                                                                                    
CLUST_FACT_IDX2                            75994                                                                                    
CLUST_FACT_IDX                              4889                                                                                    

SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4886                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4882                                                                                                                          

SQL> 
SQL> --
SQL> -- 1 block limit (Oracle default)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
     75994                                                                                                                          

SQL> 
SQL> --
SQL> -- 3 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4967                                                                                                                          

SQL> 
SQL> --
SQL> -- 5 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4861                                                                                                                          

SQL> 
SQL> --
SQL> -- 9 block limit
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4861                                                                                                                          

SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4861                                                                                                                          

SQL> 

For multiple indexes on the same table, where no column is common between them, the clustering facter can skyrocket for some indexes when the table data is ordered to favor one particular index. That example wasn’t run and is left for you to investigate. Let’s do something similar and change the order of the columns in the second index and see how that affects the clustering factor:


SQL%gt; select index_name, clustering_factor
  2  from user_indexes
  3  where table_name = 'CLUST_FACT';

INDEX_NAME                     CLUSTERING_FACTOR                                                                                    
------------------------------ -----------------                                                                                    
CLUST_FACT_IDX2                           999810                                                                                    
CLUST_FACT_IDX                              4889                                                                                    

SQL%gt; 
SQL%gt; --
SQL%gt; -- 1 block limit (Oracle default)
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 3 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 5 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4889                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 9 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4886                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 16 block limit (ASM configuration)
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4882                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 1 block limit (Oracle default)
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),1) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    999810                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 3 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),3) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    999810                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 5 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),5) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    999810                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 9 block limit
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),9) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    999810                                                                                                                          

SQL%gt; 
SQL%gt; --
SQL%gt; -- 16 block limit (ASM configuration)
SQL%gt; --
SQL%gt; select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
    999810                                                                                                                          

SQL%gt; 

Even though there is a common column between the indexes the column order matters; ordering the data by the key column for the single-column index caused the clustering factor for the second index to be much greater than it was when the leading column for the second index was the ID column.

Although associated with an index, the clustering factor is affected by the table data so no series of index rebuilds will ‘fix’ a ‘bad’ value. The table data needs to be ordered to favor an index (or indexes if they contain the column used to order the table data). This, of course, improves performance for the positively affected indexes and, unfortunately, adversely affects other indexes created against that same table. Care must be taken when deciding whether or not to order the table data; ‘reasonable’ performance metrics must be decided upon before embarking on such a change, and it should be done in test or dev before considering it in production. It may be that overall ‘acceptable’ performance across all of the indexes is better than ‘outstanding’ performance for one index that causes ‘terrible’ performance for all others. It’s not a simple decision and needs to be carefully considered.

If you want to implement the modified clustering factor computed by modifying the query Oracle uses to generate this statistic you will need to manually update the index statistics using the DBMS_STATS package using one of the SET_INDEX_STATS procedures:


SQL> 
SQL> --
SQL> -- 16 block limit (ASM configuration)
SQL> --
SQL> 
SQL> column clf new_value cl_f
SQL> 
SQL> select /*+  no_parallel_index(t, "CLUST_FACT_IDX2")  dbms_stats
  2    cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
  3    no_substrb_pad  no_expand index(t,"CLUST_FACT_IDX2") */
  4    sys_op_countchg(substrb(t.rowid,1,15),16) as clf
  5  from
  6   "BING"."CLUST_FACT" t where "ID" is not null
  7  and "SQ" is not null;

       CLF                                                                                                                          
----------                                                                                                                          
      4861                                                                                                                          

SQL> exec dbms_stats.set_index_stats(ownname => 'BING', indname => 'CLUST_FACT_IDX2', clstfct => &cl_f);

PL/SQL procedure successfully completed.

SQL> 

Using the new_value functionality in SQL*Plus saves the computed value into a reusable variable to pass to procedures and functions that need it. The above code would set the clustering factor for the CLUST_FACT_IDX2 to 4861, replacing the Oracle-calculated value of 75994. Again, care must be taken when undertaking such a change since you cannot predict the resulting performance change.

The clustering factor determines which index Oracle will choose for a query against a given table. Changing the clustering factor will influence the CBO calculations sometimes for the better, sometimes for the worse. Plan carefully and test, test, test before second-guessing Oracle.

Which just makes sense.

June 17, 2015

Let Me Say That Another Way …

Filed under: General — dfitzjarrell @ 08:50

"I never knew words could be so confusing," Milo said to Tock as he bent down to scratch the dog's ear.
"Only when you use a lot to say a little," answered Tock.  Milo thought this was quite the wisest thing he'd heard all day.
-- Norton Juster, The Phantom Tollbooth

Occasionally it may be necessary to ‘flip’ a table on its side, so to speak, meaning to convert rows to columns in order to display data in a more understandable format. Depending on the release of Oracle there are several techniques which can be used to accomplish this task. Most of these, however, require a knowledge of the number of rows, and key values, that need to be converted. With Oracle 11g it’s actually possible to define a dynamic solution to this problem, using the pivot operator. The pivot operator is described here, as part of the SELECT syntax:

http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10002.htm#SQLRF01702

Basically described PIVOT operates on the base query (the SELECT statement) and applies an aggregate supplied by the user to pivot the data from rows to columns that report the aggregated data. Its use will be illustrated in the following example.

To begin a table is created and populated that provides the data which needs to be converted:


SQL> create table name_qty(
  2          name            varchar2(20),
  3          quantity        number
  4  );

Table created.

SQL>
SQL> insert all
  2  into name_qty
  3  values('COL_A', 5000)
  4  into name_qty
  5  values('COL_B', 3000)
  6  into name_qty
  7  values('COL_C', 3000)
  8  select * From dual;

3 rows created.

SQL> select name, quantity
  2  from name_qty;

NAME                   QUANTITY
-------------------- ----------
COL_A                      5000
COL_B                      3000
COL_C                      3000

SQL>

Three column names and three associated values. The goal is to associate the proper value with the proper column name so the next step in this process is to generate a list of values comprised of the key data, the data that will name the new columns in the output. Using the WM_CONCAT function this is a fairly easy task:


SQL>
SQL> column namelist new_value n_list noprint
SQL>
SQL> select wm_concat(''''||name||'''') namelist
  2  from name_qty
  3  connect by nocycle name = prior name
  4  group by level;




SQL>

To keep the output of the entire process uncluttered the resulting column from the query shown above is not printed. [For reference purposes the output at this stage of the solution would be (‘COL_A’,’COL_B’,’COL_C’). Note also the use of the NEW_VALUE SQL*Plus function to associate the column output with a variable name that can be used later in the script. That step allows the use of the generated string in the resulting pivot query.] This is done since both the previous query and the query shown below will be placed in a single script to generate the columnar output. The script is generating a list to be used by the pivot operator to generate column names and associate the correct value with the proper column. Now it’s time to write the workhorse of this solution, the pivot query itself, which requires an aggregate on which to operate. SUM() is chosen in this example as the resulting value is computed by grouping on the NAME column, which will not change the value to be displayed:


SQL> select *
  2  from
  3  (select name, quantity
  4   from name_qty nq
  5  )
  6  pivot
  7  (
  8          sum(quantity)
  9          for name in (&n_list)
 10  );

   'COL_A'    'COL_C'    'COL_B'
---------- ---------- ----------
      5000       3000       3000

SQL> 

The effort is successful as correct values are associated with the proper column names. Another way to do this is with the xmlagg() function:


SQL> SELECT *
  2  FROM (SELECT rtrim(xmlagg(xmlelement(e,name||',') ORDER BY name).EXTRACT('//text()'),',')  names
  3                 ,quantity
  4           FROM   name_qty
  5           GROUP BY   name,quantity
  6          )
  7          Pivot   (sum(quantity)
  8          for names in (&n_list)
  9                  );

   'COL_A'    'COL_B'    'COL_C'
---------- ---------- ----------
      5000       3000       3000

SQL>

What makes this solution so convenient is the fact that rows can be added to the source table and the pivoted output will not be missing any columns. Adding data to the table and running the script again generates the following output:


SQL> insert all
  2  into name_qty
  3  values('COL_D', 5000)
  4  into name_qty
  5  values('COL_E', 3000)
  6  into name_qty
  7  values('COL_F', 3000)
  8  select * From dual;

3 rows created.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL> select wm_concat(''''||name||'''') namelist
  2  from name_qty
  3  connect by nocycle name = prior name
  4  group by level;




SQL>
SQL> select *
  2  from
  3  (select name, quantity
  4   from name_qty nq
  5  )
  6  pivot
  7  (
  8          sum(quantity)
  9          for name in (&n_list)
 10  );

   'COL_A'    'COL_F'    'COL_E'    'COL_D'    'COL_C'    'COL_B'
---------- ---------- ---------- ---------- ---------- ----------
      5000       3000       3000       5000       3000       3000

SQL> SELECT *
  2  FROM (SELECT rtrim(xmlagg(xmlelement(e,name||',') ORDER BY name).EXTRACT('//text()'),',')  names
  3                 ,quantity
  4           FROM   name_qty
  5           GROUP BY   name,quantity
  6          )
  7          Pivot   (sum(quantity)
  8          for names in (&n_list)
  9                  );

   'COL_A'    'COL_B'    'COL_C'    'COL_D'    'COL_E'    'COL_F'
---------- ---------- ---------- ---------- ---------- ----------
      5000       3000       3000       5000       3000       3000

SQL>

The script didn’t change but the output now correctly reflects the addition of three rows to the source table, and, as a result, three new columns in the pivoted output. This format also makes the data easier to read and understand.

The PIVOT operator can be a powerful tool for turning data into information, especially when looking at a data in a row format can be tedious or confusing.

It’s usually best to say more with less.

May 26, 2015

Stop That!

Filed under: General — dfitzjarrell @ 13:05

"It seems to me that almost everything is a waste of time."
- Norton Juster, The Phantom Tollbooth 

Jonathan Lewis has coined a term and its definition that, I believe, we’ll be using quite a bit:



Stoptimisation - the art of optimisation by not doing the things you don't need to do.

It’s a term we’ve needed for some time now, given the pendulum swing back to the days of yore (meaning pre-9i) with respect to database, application and query tuning. I’m seeing more and more posts in forums and newsgroups asking about tasks that I thought were long since relegated to the ‘gee, that’s really useless’ pile. Let’s look at a few of them and see why you probably shouldn’t be doing them,



Regular Index Rebuilds

Index rebuilds, for the most part, are busy work for a DBA. Yes, they can ‘clean house’ with respect to empty index blocks buried in the index tree but since the index will simply grow again to the size before the rebuild and the empty index blocks will again be scattered across the index tree I see no point in performing regularly scheduled index rebuilds. In fact, for non-partitioned indexes, I see no real reason to rebuild at all since it:



*	Locks the table and index until the rebuild is finished
*	Invalidates cursors using the associated table
*	Serves no useful purpose

Yes, there are times when local indexes on a partitioned table will need to be rebuilt, but those times are usually due to DDL against the partitioned table (dropping partitions, adding/splitting partitions, swapping partitions). The listed DDL actions can make local index partitions unusable, requiring them to be rebuilt. It’s not a ‘size’ thing, it’s not a ‘performance’ thing, it’s because the unusable index interferes with table access and thus production processes. What is troubling is the number of DBAs asking about regularly scheduled index rebuilds based on antiquated ‘criteria’ such as B-tree depth or index size. Even MOS has taken down it’s original document on when to rebuild an index and replaced it with a more responsible version that better addresses the topic. Still, there are DBAs firmly convinced that scheduling index rebuilds once a week, once a month through cron or DBMS_SCHEDULER must certainly improve the performance of queries and production processes. It doesn’t, and it really just inconveniences the end users while the index rebuilds are in progress. Since most application tables have more than one index in place, rebuilding indexes for a given table can take hours, and lock the table for the entire time, essentially shutting down production for the duration of the rebuilds. I can’t see how that improves performance.



Continually 'Tweaking' Database Parameters

There are DBAs who can’t seem to be satisfied with the performance of the database, and constantly hunt for ‘problem’ areas whether or not they actually affect performance. This is commonly referred to as Compulsive Tuning Disorder (henceforth referred to as CTD). CTD creates an endless cycle of ‘tune this, now tune that, now tune something else’, all based on the most minute deviationsa in wait statistics. CTD is one of the biggest time wasters for a DBA; it’s like Ponce De Leon’s search for the Fountain Of Youth. Not every wait statistic needs to be perfectly adjusted, and it’s impossible to do in the real world. It all boils down to what the DBA considers performance versus what the end-users consider performance. In the throes of CTD EVERYTHING is a potential ‘problem’ even if it doesn’t affect the end-user experience. On the end-user side a performance problem exists when processes take longer than they expect. Once the end-user problem has been addressed tuning should stop since further adjustments won’t provide any additional benefit. Wait statistics will never be ideal in a production system; multiple users accessing and modifying data will cause concurrency waits, no matter how small, and it’s useless to address such waits to get the response time perfect. CTD turns the most reliable of DBAs into a micro-manager of epic proportions and the efforts expended to ‘tweak’ parameters that have no bearing on the actual system performance are, honestly, useless.



Table Reorganization

As tables get larger and larger queries accessing data can gradually take longer to complete, notably if the query relies on a full table scan to fetch that data. There are still some DBAs who are convinced that reorganizing the table data will go a long way in improving performance. One of those reorganizations involves sorting the table data to improve the clustering factor. Yes, the clustering factor for an index is calculated based on the ‘location’ of the table data with respect to the sorted index keys, but ‘improving’ the clustering factor for one index usually makes the clustering factor worse for every other index against that table. Another point to make is that these are heap tables, with no real data order established; inserted data can go anywhere there is room in any data block associated with that table. Sorting the data only lasts until the first insert afterwards, after which index keys again become scattered through the table data. Years ago vendors argued that sorting the data was the best way to improve performance, and ‘suggested’ that their product be used on a regular basis to maintain this wonderful sorted order. The problems with that idea are that the data can be sorted for one index built against that table, not all and that the data will gradually return to its unsorted order as the end-users process data. This becomes, like CTD, a never-ending cycle of ‘sort, sort, sort, sort, sort’ all under the misguided notion that it’s making things better. It can’t, since every time the data is sorted the production system is rendered unavailable. If the end-users can’t work it doesn’t matter how fast the queries run AFTER the sort process has run. Unfortunately once the DBA has installed such blinders he or she is unaware of the inconvenience such processes create. The end-users need to work, not wait for some DBA to sort a pile of data only to have it return to being an unsorted pile a day or two down the road. The DBA should be working to create meaningful and lasting changes to improve performance; query tuning, plan stability and index analysis are worthwhile tasks that can produce tangible benefits that last far longer than the tasks it took to create them.

There are probably other time-wasters for the DBA that aren’t listed here; knowing what SHOULD be done versus what CAN be done is the hallmark of a great DBA. Looking again at the term introduced in this post should direct you toward useful tuning tasks that provide long-term benefit and that don’t require constant attention or repeated execution. Nothing is perfect, especially your database, so don’t try to make it so because you’ll only end up on The Endless Tuning Treadmill suffering from Compulsive Tuning Disorder. “Stoptimization” is what the DBA needs to be concerned with, and that’s not doing the things you don’t need to do. There is plenty of REAL work for the DBA to accomplish day-to-day. Don’t get wrapped up in the minutiae; it’s simply not worth the effort.


"For there's always something to do to keep you from what you really should be doing, ..."
- Norton Juster, The Phantom Tollbooth 

Ain’t that the truth.

May 20, 2015

That Depends

Filed under: General — dfitzjarrell @ 11:00

In every universe there are questions that either:


Have no answer 
or 
Have an answer that is situation-dependent

and that includes the Oracle universe. Sometimes it’s difficult to get that concept across to the less knowledgeable. Let’s go back to a simple example from a previous post to illustrate this.

In Resurrecting The Dead flashback operations were discussed as an option to restore table data to before an errant update. The post started with this:

Occasionally an end-user does the unthinkable, and changes data permanently (or so it appears) without checking the results before issuing a commit. Ooops. 
It used to be that to restore that data one had basically two choices:

A) Restore the data from a known good copy made before the changes were enacted
B) Restore the table from the last known good export

Yes, there was a third choice, an incomplete tablespace recovery but that presumed the database to be in ARCHIVELOG mode and, gasp, there are databases 
running in NOARCHIVELOG mode where this wouldn't work.

We have a situation where data was updated and now needs to be reverted back with the question being “How do I do that?” And, this is one of those situation-dependent answers, the situation being the version of Oracle in use. If the user was using any version prior to 9.0.x there wasn’t much choice except to follow the path laid out at the start of the post. If that situation changed, and the version was either 9.0.x or 9.2.x, another solution presented itself:

So, what is a DBA to do? If you're running 9i you can enable flashback query by using the dbms_flashback package, which was nice but rather cumbersome 
in implementation, as it only allowed you to query the flashback data while enabled so updates to existing tables (to restore known good data) were 
somewhat convoluted in execution; it was necesary to enable flashback mode, open a cursor, then disable flashback mode to effect the updates:
declare
  --
  -- Cursor to fetch the required data
  --
  cursor c1 is
  select flerg, snerm, anguplast
  from snangpiester;

  --
  -- A place to stash each row of the returned data
  --
  c1_rec c1%rowtype;

begin

  --
  -- We flashback the data image to before the problem began
  --
  dbms_flashback.enable_at_time(to_timestamp('16-SEP-2007 06:53:00 AM','DD-MON-RRRR HH:MI:SS AM'));

  --
  -- Open the cursor while in flashback mode
  --
  open c1;

  --
  -- Disable flashback mode so we can update the problem table
  --
  dbms_flashback.disable;

  --
  -- Go fetch the good data and update the problem table
  --
  loop
          fetch c1 into c1_rec;
          exit when c1%notfound;  -- say goodbye when there's no more data
          update snangpiester
          set anguplast = c1_rec.anguplast
          where flerg = c1_rec.flerg
          and snerm = c1_rec.snerm;
  end loop;

  --
  -- Commit the changes
  --

  commit;

end;
/

So another possible solution presents itself. And there is a third solution, for those using version 10.1.x or greater, that was even more convenient. Let’s leave it to you to follow the provided link and read the original post. The point to be made is that some seemingly simple questions aren’t so simple to answer, since they depend on any number of conditions. This is why it is so important to provide the Oracle version in use as it may change a seemingly stock answer. Providing incomplete information can generate the dreaded response: “It depends.”

Questions that fall into this category include, but are not limited to, those on backup and recovery, databasec cloning, data replication and tuning. Each release of Oracle improves on the previous release, including how the optimizer works. Upgrades can improve or degrade performance based on the changes made to the optimizer so questions like “how can I make this query faster?” have no hard-and-fast answer, even though on the face of it the question seems simple.

I can’t count how many times I’ve seen or given the “It depends.” answer and I’m fairly certain that the person asking the question believes that response is forum-speak for “I don’t know.” Nothing could be further from the truth since “It depends.” is usually followed by the responder requesting more information so he or she has a fighting chance of giving a correct answer. Providing relevant details ‘up front’ makes it easier for forum participants to asses the situation and provide a usable response. “It depends.” isn’t a ‘cop-out’ (to use an ancient colloquialism coined before the dawn of time), it’s an indication that the question needs more information before it can be answered. It also means the forum participants care enough to give you an accurate answer, one you can actually use. Remember that they are taking time to participate in the forum; you should also take time to think through your question and provide as much detail as possible. Every little bit helps.

“How do I …” Well, it depends …

May 18, 2015

Perception Is Everything

Filed under: General,pl/sql — dfitzjarrell @ 08:22

"There is much worth noticing that often escapes the eye."
- Norton Juster, The Phantom Tollbooth

Using BULK COLLECT in PL/SQL blocks and procedures can dramatically speed array processing, but it can, if the DBA isn’t prepared, ‘hide’ any errors that occur in the bulk processing list. A ‘plain vanilla’ EXCEPTION handler may not report all errors that are thrown. Let’s look at an example intentionally set up to fail inserts based on data from the EMP table. Table M is created with the EMP columns slightly re-ordered so the data types don’t match up to the source:


SQL> CREATE TABLE M
  2  	    (EMPNO NUMBER(4) NOT NULL,
  3  	     MGR NUMBER(4),
  4  	     JOB VARCHAR2(9),
  5  	     ENAME VARCHAR2(10),
  6  	     HIREDATE DATE,
  7  	     SAL NUMBER(7, 2),
  8  	     COMM NUMBER(7, 2),
  9  	     DEPTNO NUMBER(2));

Table created.

SQL>

The ENAME column is now fourth in the list, rather than second, If an attempt is made to simply ‘shove’ the EMP data into M it’s certain to generate a number of ‘invalid number’ errors, but if the PL/SQL loop and exception handler aren’t coded to take advantage of the BULK COLLECT error trapping at most one of the many errors generated will be reported:


SQL> DECLARE
  2  	type emp_tbl is table of emp%rowtype;
  3  	emp_data emp_tbl;
  4  	cursor EMPINFO is
  5  	select * from emp;
  6
  7
  8  BEGIN
  9  OPEN EMPINFO;
 10  LOOP
 11
 12  	FETCH EMPINFO BULK COLLECT INTO emp_data LIMIT 200;
 13  	EXIT WHEN emp_data.count = 0;
 14  	BEGIN
 15  	     DBMS_OUTPUT.PUT_LINE('Request rows ' || emp_data.COUNT);
 16  	     FORALL i IN 1..emp_data.COUNT
 17  		 INSERT INTO m VALUES emp_data(i);
 18
 19  	EXCEPTION
 20  	       WHEN others THEN -- Now we figure out what failed and why.
 21  		     -- Output desired error message
 22  		     dbms_output.put_line('-20999: Sumthin'' bad happened -- error stack follows');
 23  		     -- Output actual line number of error source
 24  		     dbms_output.put(dbms_utility.format_error_backtrace);
 25  		     -- Output the actual error number and message
 26  		     dbms_output.put_line(dbms_utility.format_error_stack);
 27  	END;
 28
 29  END LOOP;
 30  END;
 31  /
Request rows 18
-20999: Sumthin' bad happened -- error stack follows
ORA-06512: at line 16
ORA-01722: invalid number


PL/SQL procedure successfully completed.

SQL>

Taking another route the PL/SQL code is changed to provide a user-defined exception and variables to hold the error messages and numbers generated for each insert error. BULK COLLECT is also instrumented to save all of the exceptions generated. Running the modified code provides the following output:


SQL>
SQL> DECLARE
  2  	type emp_tbl is table of emp%rowtype;
  3  	emp_data emp_tbl;
  4  	cursor EMPINFO is
  5  	select * from emp;
  6  	errorCnt     number;
  7  	errString    varchar2(4000);
  8  	errCode      number;
  9  	dml_errors   exception;
 10  	pragma exception_init(dml_errors, -24381);
 11
 12
 13  BEGIN
 14  OPEN EMPINFO;
 15  LOOP
 16
 17  	FETCH EMPINFO BULK COLLECT INTO emp_data LIMIT 200;
 18  	EXIT WHEN emp_data.count = 0;
 19  	BEGIN
 20  	     DBMS_OUTPUT.PUT_LINE('Request rows ' || emp_data.COUNT);
 21  	     FORALL i IN 1..emp_data.COUNT SAVE EXCEPTIONS
 22  		 INSERT INTO m VALUES emp_data(i);
 23
 24  	EXCEPTION
 25  	       WHEN dml_errors THEN -- Now we figure out what failed and why.
 26  		     errorCnt := SQL%BULK_EXCEPTIONS.COUNT;
 27  		     errString := 'Number of statements that failed: ' || TO_CHAR(errorCnt);
 28  		     dbms_output.put_line(errString);
 29
 30  		     FOR i IN 1..errorCnt LOOP
 31  			 IF SQL%BULK_EXCEPTIONS(i).ERROR_CODE > 0
 32  			 THEN
 33  			     errString := CHR(10) || 'Error #' || i || CHR(10) || 'Error message is ' ||  SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE);
 34  			     dbms_output.put_line(errString);
 35  			 ELSE
 36  			     errString := CHR(10) || 'Error #' || i || CHR(10) || 'Error message is ' ||  SQLERRM(SQL%BULK_EXCEPTIONS(i).ERROR_CODE);
 37  			     dbms_output.put_line(errString);
 38  			     RAISE;
 39  			 END IF;
 40  		     END LOOP;
 41  	END;
 42
 43  END LOOP;
 44  END;
 45  /
Request rows 18
Number of statements that failed: 18

Error #1
Error message is ORA-01722: invalid number

Error #2
Error message is ORA-01722: invalid number

Error #3
Error message is ORA-01722: invalid number

Error #4
Error message is ORA-01722: invalid number

Error #5
Error message is ORA-01722: invalid number

Error #6
Error message is ORA-01722: invalid number

Error #7
Error message is ORA-01722: invalid number

Error #8
Error message is ORA-01722: invalid number

Error #9
Error message is ORA-01722: invalid number

Error #10
Error message is ORA-01722: invalid number

Error #11
Error message is ORA-01722: invalid number

Error #12
Error message is ORA-01722: invalid number

Error #13
Error message is ORA-01722: invalid number

Error #14
Error message is ORA-01722: invalid number

Error #15
Error message is ORA-01722: invalid number

Error #16
Error message is ORA-01722: invalid number

Error #17
Error message is ORA-01722: invalid number

Error #18
Error message is ORA-01722: invalid number

PL/SQL procedure successfully completed.

SQL>

There are 18 rows in this slightly modified data set so 18 exceptions were generated. All of the exceptions were reported by the modified exception handler. Listing the changes made to the original code shows that three variables were declared (errorCnt, errString and errCode) and a user-defined exception was provided (dml_errors, initialized to error code -24381 (invalid number). The real ‘magic’ lies in the exception handler itself:


   	EXCEPTION
   	       WHEN dml_errors THEN -- Now we figure out what failed and why.
   		     errorCnt := SQL%BULK_EXCEPTIONS.COUNT;
   		     errString := 'Number of statements that failed: ' || TO_CHAR(errorCnt);
   		     dbms_output.put_line(errString);
   
   		     FOR i IN 1..errorCnt LOOP
   			 IF SQL%BULK_EXCEPTIONS(i).ERROR_CODE > 0
   			 THEN
   			     errString := CHR(10) || 'Error #' || i || CHR(10) || 'Error message is ' ||  SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE);
   			     dbms_output.put_line(errString);
   			 ELSE
   			     errString := CHR(10) || 'Error #' || i || CHR(10) || 'Error message is ' ||  SQLERRM(SQL%BULK_EXCEPTIONS(i).ERROR_CODE);
   			     dbms_output.put_line(errString);
   			     RAISE;
   			 END IF;
   		     END LOOP;
   	END;

Each time the error is thrown in the loop the exception handler goes to work reporting the record number generating the error, the error number and the error text. Using SQL%BULK_EXCEPTIONS() array it’s possible to extract the error code and, by a call to SQLERRM, the associated error message. The handler can process both positive and negative error codes, and on negative error codes makes a call to RAISE to stop normal execution. Since no negative errors were thrown in this example the loop execution continued until all rows were processed, reporting every error encountered during the run.

Coding exception handlers correctly (to provide useful, rather than confusing, messages) is key in being able to let users report errors they encounter. Being able to see which records in a bulk collection are generating errors makes it even easier to diagnose and correct problems in bulk data processing, and knowing how to write such exception handlers provides that information to the end users. Using this template makes that task easier (hopefully) so the development team won’t be ‘shooting in the dark’ when a bulk loop process fails to process all of the desired records.

Using bulk processing when it’s appropriate can save time and effort; writing a proper exception handler can help tremendously in troubleshooting any errors that may arise.

It all depends upon how you look at things.

May 14, 2015

Some People’s Kids

Filed under: General — dfitzjarrell @ 13:39

"Expectations is the place you must always go to before you get to where you're going. Of course, 
some people never go beyond Expectations, but my job is to hurry them along whether they like it or not."
- Norton Juster, The Phantom Tollbooth

From time to time I find a situation where a developer believes that:


	He or she believes referential integrity is not necessary
or
	He or she is better at enforcing referential integrity than the database

In the first case they seem to ignore logic and let the chips fall where they may, which in my mind is a mistake. In the second case they code intricate sections generating unique ids based on the maximum value of the id column. They then use this ‘unique’ key to also enforce referential integrity in child tables. Unfortunately referential integrity isn’t transactional, which is one reason these attempts fail. Let’s look at an example and see how the situation can be improved by using the built-in features of Oracle.

An example table was created and populated, then a process written to insert new unique values in the table by using the max() of the intended key column:


SQL> --
SQL> -- Create test table
SQL> --
SQL> create table ins_test(keycol number, keyval varchar2(20));

Table created.

SQL>
SQL> --
SQL> -- Add primary key constraint
SQL> --
SQL> alter table ins_test add constraint ins_test_pk primary key (keycol);

Table altered.

SQL>
SQL> --
SQL> -- Insert data
SQL> --
SQL> insert all
  2  into ins_test
  3  (keycol, keyval)
  4  values
  5  (1, 'First value')
  6  into ins_test
  7  (keycol, keyval)
  8  values
  9  (2, 'Second value')
 10  into ins_test
 11  (keycol, keyval)
 12  values
 13  (3, 'Third value')
 14  into ins_test
 15  (keycol, keyval)
 16  values
 17  (4, 'Fourth value')
 18  into ins_test
 19  (keycol, keyval)
 20  values
 21  (5, 'Fifth value')
 22  into ins_test
 23  (keycol, keyval)
 24  values
 25  (6, 'Sixth value')
 26  select * from dual;

6 rows created.

SQL>
SQL> --
SQL> -- Commit changes
SQL> --
SQL> commit;

Commit complete.

SQL>
SQL> --
SQL> -- Start questionable process to
SQL> -- insert more data based upon
SQL> -- current max(keycol) value
SQL> --
SQL>
SQL> --
SQL> -- Set a variable to reuse the returned
SQL> -- max value
SQL> --
SQL> --
SQL> -- Rather dumb idea as the max() from
SQL> -- any query will miss any new values
SQL> -- inserted by other sessions and not
SQL> -- yet committed
SQL> --
SQL> column maxval new_value next_key
SQL>
SQL> --
SQL> -- Return current max(keycol)
SQL> --
SQL> -- Not reliable in the least
SQL> -- unless there is only one user
SQL> -- ever on the system, and it's
SQL> -- you
SQL> --
SQL> select max(keycol) maxval from ins_test;

    MAXVAL
----------
         6

SQL>
SQL> --
SQL> -- Use the saved value for the next insert
SQL> --
SQL> -- Not a good idea
SQL> --
SQL> -- Using a sequence and a trigger is far
SQL> -- more reliable and recommended
SQL> --
SQL> insert into ins_test (keycol, keyval)
  2  values (&next_key + 1, 'Next value in line');
old   2: values (&next_key + 1, 'Next value in line')
new   2: values (         6 + 1, 'Next value in line')

1 row created.

SQL>

So far, so good, but let’s look at the second session:


SQL> @ins_w_var_second_sess.sql

    MAXVAL
----------
         7

old   2: values (&next_key + 1, 'Next value in line')
new   2: values (         7 + 1, 'Next value in line')
insert into ins_test (keycol, keyval)
*
ERROR at line 1:
ORA-00001: unique constraint (SYS.INS_TEST_PK) violated

PL/SQL procedure successfully completed.


Commit complete.

SQL>

The second session was waiting for the row-level lock to be released before processing the insert, which failed. This is the first reason performing such tasks in the application is a bad idea, it relies on transactions to generate key values, which, as you can see, tried to generate the same key in a second session as was generated in the first. This is also the reason why referential integrity cannot be enforced in the application code — the current transaction can’t see beyond itself, so any other key inserts to the table won’t be recognized and child inserts can then fail. This also makes for a very poorly performing application.

Let’s try this again with Oracle at the helm:


SQL>
SQL> --
SQL> -- Create test table
SQL> --
SQL> create table ins_test(keycol number, keyval varchar2(20));

Table created.

SQL>
SQL> --
SQL> -- Add primary key constraint
SQL> --
SQL> alter table ins_test add constraint ins_test_pk primary key (keycol);

Table altered.

SQL>
SQL> --
SQL> -- Add a sequence, and a trigger, to populate the key column
SQL> --
SQL> create sequence ins_test_seq
  2  start with 1
  3  increment by 1
  4  nomaxvalue
  5  nocycle
  6  order;

Sequence created.

SQL>
SQL> create or replace trigger pop_ins_test_pk
  2  before insert on ins_test
  3  for each row
  4  begin
  5          select ins_test_seq.nextval
  6          into :new.keycol
  7          from dual;
  8  end;
  9  /

Trigger created.

SQL>
SQL> --
SQL> -- Insert data
SQL> --
SQL> insert all
  2  into ins_test
  3  (keyval)
  4  values
  5  ('First value')
  6  into ins_test
  7  (keyval)
  8  values
  9  ('Second value')
 10  into ins_test
 11  (keyval)
 12  values
 13  ('Third value')
 14  into ins_test
 15  (keyval)
 16  values
 17  ('Fourth value')
 18  into ins_test
 19  (keyval)
 20  values
 21  ('Fifth value')
 22  into ins_test
 23  (keyval)
 24  values
 25  ('Sixth value')
 26  select * from dual;

6 rows created.

SQL>
SQL> --
SQL> -- Commit changes
SQL> --
SQL> commit;

Commit complete.

SQL>
SQL> insert into ins_test (keyval)
  2  values ('Next value in line');

1 row created.

SQL>
SQL> --
SQL> -- Wait for a minute so a second insert of this
SQL> -- same type can occur from a different session
SQL> --
SQL>
SQL> exec dbms_lock.sleep(60);

PL/SQL procedure successfully completed.

SQL>

Checking the second session we see it isn’t blocked and inserts a unique key value successfully:


SQL> --
SQL> -- Using a sequence and a trigger is far
SQL> -- more reliable and recommended
SQL> --
SQL> insert into ins_test (keyval)
  2  values ('Next value in line');

1 row created.

SQL>
SQL> --
SQL> -- Commit the changes, or try to
SQL> --
SQL> commit;

Commit complete.

SQL>

Verifying that both inserts were successful and did, indeed, insert unique values:


SQL> --
SQL> -- Commit the changes, or try to
SQL> --
SQL> commit;

Commit complete.

SQL>
SQL> --
SQL> -- Select the data and verify keys are unique
SQL> --
SQL>
SQL> select * From ins_test;

    KEYCOL KEYVAL
---------- --------------------
         8 Next value in line
         1 First value
         2 Second value
         3 Third value
         4 Fourth value
         5 Fifth value
         6 Sixth value
         7 Next value in line

8 rows selected.

SQL>

Using the built-in functionality of Oracle provided a solution that does not rely on a transaction completing and truly generates unique data. Moving on to the referential integrity part of the discussion you will need to successfully insert every parent key before you can reference it in the child tables. Using the transactional method this cannot occur and you will regularly see:


SQL> insert into fk_test
  2  values (9, 'Next foreign key reference')
  3  /
insert into fk_test
*
ERROR at line 1:
ORA-02291: integrity constraint (GRIBNAUT.FK_TEST_FK) violated - parent key
not found


SQL>

This is not an occurrence you want to witness in any environment, especially production. And no matter how hard the developers try to get it right with their own code, it’s going to fail at some point due to the concurrency mechanism Oracle employs or because of transaction locks blocking other sessions.

As I said before, referential integrity isn’t transactional, which means any transactional method used to try and enforce it will eventually fail. This is why Oracle provides sequences and foreign key constraints, so that you won’t have to rely on the application trying to generate unique key values from a transactional operation. Maybe, just maybe, developers will stop trying to make that work in their code after reading this post.

Hope springs eternal.

May 1, 2015

Too Much Time

Filed under: General — dfitzjarrell @ 12:44
"It's bad enough wasting time without killing it." 
 Norton Juster, The Phantom Tollbooth 

AWR reports were a tremendous improvement over Statspack reports, primarily due to the depth and breadth of the sample data collected. A more detailed report, with extended metrics, provides a better look at what the database is doing during a given interval. Unfortunately this detail can create unusual information, especially in the SQL Elapsed Time section. For ‘normal’ queries (read that as ‘non-parallel’) the elapsed time is usually pretty accurate. Add in parallel query slaves and the overal elapsed time can grow to several times the actual clock time the query or statement consumed. Let’s set up an example, running in parallel, and see what the AWR report provides.

Let’s create a copy of EMP that has a non-0 degree of parallelism:

SQL> CREATE TABLE EMP
  2         (EMPNO NUMBER(4) NOT NULL,
  3          ENAME VARCHAR2(10),
  4          JOB VARCHAR2(9),
  5          MGR NUMBER(4),
  6          HIREDATE DATE,
  7          SAL NUMBER(7, 2),
  8          COMM NUMBER(7, 2),
  9          DEPTNO NUMBER(2))
 10  parallel 4;

Table created.

SQL>

Now let’s make it a fairly large table:

SQL> begin
  2  for i in 1..20 loop
  3     insert into emp
  4     select * from emp;
  5  end loop;
  6
  7  commit;
  8
  9  end;
 10  /

PL/SQL procedure successfully completed.

SQL> select count(*)
  2  from emp;

  COUNT(*)
----------
  14680064

SQL>

Verifying that parallel is being used to process queries:


SQL> select *
  2  from emp
  3  where empno < 7400;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
...
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20

1048576 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 2873591275

--------------------------------------------------------------------------------------------------------------
| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT     |          |  1073K|    89M|  6543   (1)| 00:01:19 |        |      |            |
|   1 |  PX COORDINATOR      |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)| :TQ10000 |  1073K|    89M|  6543   (1)| 00:01:19 |  Q1,00 | P->S | QC (RAND)  |
|   3 |    PX BLOCK ITERATOR |          |  1073K|    89M|  6543   (1)| 00:01:19 |  Q1,00 | PCWC |            |
|*  4 |     TABLE ACCESS FULL| EMP      |  1073K|    89M|  6543   (1)| 00:01:19 |  Q1,00 | PCWP |            |
--------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   4 - filter("EMPNO"<7400)

Note
-----
   - dynamic sampling used for this statement (level=2)


Statistics
----------------------------------------------------------
         17  recursive calls
          0  db block gets
     173077  consistent gets
      86341  physical reads
          0  redo size
   18036545  bytes sent via SQL>*Net to client
     769454  bytes received via SQL>*Net from client
      69907  SQL>*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
    1048576  rows processed

SQL>

Now generate an AWR report for the interval in question:

SQL ordered by Elapsed Time

  • Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
  • % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
  • %Total – Elapsed Time as a percentage of Total DB time
  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Captured SQL account for 98.0% of Total DB Time (s): 18
  • Captured PL/SQL account for 0.6% of Total DB Time (s): 18
Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id SQL Module SQL Text
10.36 1 10.36 58.70 19.57 73.06 avrt3mgztynzh SQL*Plus select /*+ parallel(12) */ * f…
4.96 1 4.96 28.12 96.15 1.89 572fbaj0fdw2b sqlplus.exe select output from table(dbms_…
0.20 1 0.20 1.11 103.08 0.00 bunssq950snhf insert into wrh$_sga_target_ad…
0.15 16 0.01 0.87 111.50 0.08 3s1hh8cvfan6w SQL*Plus SELECT PLAN_TABLE_OUTPUT FROM …
0.15 1 0.15 0.87 91.92 0.00 dayq182sk41ks insert into wrh$_memory_target…
0.15 1 0.15 0.86 92.16 0.00 bm2pwrpcr8ru6 select sga_size s, sga_size_fa…
0.14 16 0.01 0.82 108.24 0.08 g3f3cw3zy5aat SQL*Plus SELECT PLAN_TABLE_OUTPUT FROM …
0.13 16 0.01 0.72 122.57 0.00 f0a1c90fu7jtd SQL*Plus SELECT /*+ opt_param(‘parallel…
0.12 121 0.00 0.69 12.75 0.00 772s25v1y0x8k select shared_pool_size_for_es…
0.09 1 0.09 0.52 101.63 0.00 1bx8mgs8by25x sqlplus.exe select coalesce( p1s.parameter…

Notice that in this AWR report the elapsed time for our query is 10.36 seconds. The actual elapsed time, reported when timing is on, and the execution plan is:


Elapsed: 00:04:29.31

Execution Plan
----------------------------------------------------------
Plan hash value: 2873591275

--------------------------------------------------------------------------------------------------------------
| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT     |          |  1073K|    89M|  2181   (1)| 00:00:05 |        |      |         |
|   1 |  PX COORDINATOR      |          |       |       |            |          |        |      |         |
|   2 |   PX SEND QC (RANDOM)| :TQ10000 |  1073K|    89M|  2181   (1)| 00:00:05 |  Q1,00 | P->S | QC (RAND)  |
|   3 |    PX BLOCK ITERATOR |          |  1073K|    89M|  2181   (1)| 00:00:05 |  Q1,00 | PCWC |         |
|*  4 |     TABLE ACCESS FULL| EMP      |  1073K|    89M|  2181   (1)| 00:00:05 |  Q1,00 | PCWP |         |
--------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   4 - filter("EMPNO"<=7400)

So why the discrepancy? Why does AWR report a longer elapsed time than actually occurred? Oracle Support addresses this in MOS note 1956033.1 and reports that this behavior is not a bug. According to Oracle Support the elapsed time (taken from the V$SQL view) includes time for the Query Coordinator and the parallel query slaves operating on that query. In a non-parallel execution such aggregation produces results very close, if not exactly matching, the wall clock time. In this case the elapsed time computed for the AWR report is over twice as long as the actual execution time. This doesn’t mean that there were two parallel query slaves in use; the query was hinted to provide a parallelism of 12. Thus, the sum of the elapsed time for the Query Coordinator and the elapsed time for each of the 12 parallel query slaves adds up to 10.36 seconds. If we set the degree for the EMP table to 1 and run a non-hinted query to get a serial execution time the result is:


Elapsed: 00:02:04.08

Execution Plan
----------------------------------------------------------
Plan hash value: 3956160932

--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |  1073K|    89M| 23573   (1)| 00:04:43 |
|*  1 |  TABLE ACCESS FULL| EMP  |  1073K|    89M| 23573   (1)| 00:04:43 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter("EMPNO"<=7400)

And another AWR report shows:

SQL ordered by Elapsed Time

  • Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
  • % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
  • %Total – Elapsed Time as a percentage of Total DB time
  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Captured SQL account for 97.1% of Total DB Time (s): 3
  • Captured PL/SQL account for 37.2% of Total DB Time (s): 3
Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id SQL Module SQL Text
1.62 1 1.62 48.69 93.32 2.70 19duabgggdwaj SQL*Plus select * from emp where empno …
1.07 0 32.07 65.73 18.91 1uk5m5qbzj1vt SQL*Plus BEGIN dbms_workload_repository…
0.22 1 0.22 6.75 104.07 0.00 bunssq950snhf insert into wrh$_sga_target_ad…
0.18 1 0.18 5.55 75.93 0.14 32b51bs6x2ux7 SQL*Plus EXPLAIN PLAN SET STATEMENT_ID=…
0.17 2 0.08 4.98 47.02 14.20 gpf6csqpdaymp SQL*Plus select * From dba_scheduler_jo…
0.16 1 0.16 4.81 97.32 0.00 dayq182sk41ks insert into wrh$_memory_target…
0.16 1 0.16 4.77 98.25 0.00 bm2pwrpcr8ru6 select sga_size s, sga_size_fa…
0.10 1 0.10 2.88 0.00 74.78 6ajkhukk78nsr begin prvt_hdm.auto_execute( :…
0.07 66 0.00 2.23 0.00 96.67 5h7w8ykwtb2xt INSERT INTO SYS.WRI$_ADV_PARAM…
0.06 1 0.06 1.94 0.00 93.15 f0dtmk7ap93vx DBMS_SCHEDULER DECLARE object_type varchar2(4…
0.06 1 0.06 1.72 27.31 87.39 350myuyx0t1d6 insert into wrh$_tablespace_st…
0.04 2 0.02 1.13 83.07 1.25 3s1hh8cvfan6w SQL*Plus SELECT PLAN_TABLE_OUTPUT FROM …
0.04 2 0.02 1.08 87.09 1.31 g3f3cw3zy5aat SQL*Plus SELECT PLAN_TABLE_OUTPUT FROM …
0.04 34 0.00 1.06 0.00 0.00 772s25v1y0x8k select shared_pool_size_for_es…

In this report the elapsed time for the serial query (1.62 seconds) closely aligns with the reported elapsed time from SQL*Plus (2.04 seconds).

The question remains: how to get a fairly accurate elapsed time for queries executing in parallel? As demonstrated here using:


set timing on

is one way to get the elapsed time. Another, more accurate, way is to generate a 10046 trace for the query in question. The trace file, and the formatted output from tkprof, will provide the correct elapsed time for the query:


select /*+ parallel(12) */ *
from emp
where empno <= 7400

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.03          0          1          0           0
Execute      1      0.00       0.18          0         15          0           0
Fetch    69907      2.23       2.36          0          0          0     1048576
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total    69909      2.23       2.58          0         16          0     1048576

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 184
Number of plan statistics captured: 1

Rows (1st) Rows (avg) Rows (max)  Row Source Operation
---------- ---------- ----------  ---------------------------------------------------
   1048576    1048576    1048576  PX COORDINATOR  (cr=15 pr=0 pw=0 time=1086677 us)
         0          0          0   PX SEND QC (RANDOM) :TQ10000 (cr=0 pr=0 pw=0 time=0 us cost=2181 size=93396936 card=1073528)
         0          0          0    PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us cost=2181 size=93396936 card=1073528)
         0          0          0     TABLE ACCESS FULL EMP (cr=0 pr=0 pw=0 time=0 us cost=2181 size=93396936 card=1073528)

The elapsed time reported by the 10046 trace is less than that reported by ‘set timing on’ and that’s probably due to the time spent sending output to the display. The actual database elapsed time was under 3 seconds, with the elapsed time reported by SQL*Plue as 4.29 seconds. This is an acceptable discrepancy given that displaying results to a terminal screen takes time. I wouldn’t expect the times to match as two different mechanisms are in use to generate elapsed time between the two tools. They are close enough to know that the AWR report, aggregating time from V$SQL, is reporting inflated figures because of the parallel execution.

Parallel query execution can save time in some cases by using a ‘divide an conquer’ approach to result set processing. It is unfortunate tha the V$SQL performance view contains inflated elapsed times for queries run in parallel. Since Oracle Support does not consider this a bug it’s not going to be changed any time soon. Knowing this makes it easier to understand elapsed times in AWR reports when parallelism is used, and now you have at least two ways to generate fairly accurate elapsed execution times for such queries. It makes it a bit more involved to tune queries using parallism but the effort is worth the time and trouble.

Tims’s a wastin’.

April 14, 2015

Columns, Columns Everywhere

Filed under: General,joins — dfitzjarrell @ 08:54

"Many of the things which can never be, often are."
- Norton Juster, The Phantom Tollbooth 

Oracle’s most recent database release has an interesting problem involving ANSI joins and tables having 500 or more columns. Yes, this is likely a rare situation in OLTP systems but it exists, nonetheless. [Data warehouses are different and it’s likely that tables of 500 columns or more could exist.] It was brought to light in a forum I frequent. Given the right conditions a query of the form:


select a.*
from a 
join b on ...
join c on ...;

throws an ORA-01792 even though none of the involved tables has 1000 columns defined. Let’s look at an example and see what Oracle is doing with the ANSI join:


SQL> 
SQL> --
SQL> -- Create 500 column tables
SQL> --
SQL> declare v_sql varchar2(32767);
  2  
  3  begin
  4  
  5    -- create test table ORANGE with 50 columns
  6    v_sql := 'create table ORANGE (Z_COL_001 number(9) not null';
  7    for i in 1 .. 499 loop
  8      v_sql := v_sql || ',' || chr(10) || 'Z_COL_' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
  9    end loop;
 10    v_sql := v_sql || ')';
 11    execute immediate v_sql;
 12  
 13    -- create test table MAUVE with 50 columns
 14  
 15    v_sql := 'create table MAUVE (Z_COL_001 number(9) not null';
 16    for i in 1 .. 499 loop
 17      v_sql := v_sql || ',' || chr(10) || 'T_COL__' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
 18    end loop;
 19    v_sql := v_sql || ')';
 20    execute immediate v_sql;
 21  
 22  end;
 23  /

PL/SQL procedure successfully completed.

SQL> 
SQL> -- create test table YELLOW with 2 columns
SQL> 
SQL> create table YELLOW (Z_COL_001 number(9) not null, P_COLUMN_002 varchar2(2));

Table created.

SQL> 
SQL> --********************************************************************************--
SQL> -- selecting one column work!
SQL> --********************************************************************************--
SQL> 
SQL> select p.P_COLUMN_002
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- notice the YELLOW table only has 2 columns, but selecting p.* fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select p.*
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;
  join YELLOW p on g.Z_COL_001 = p.Z_COL_001
       *
ERROR at line 4:
ORA-01792: maximum number of columns in a table or view is 1000 


SQL> 

The query above relies on star expansion of the select list; lest you think that is the source of the problem let’s look at a query where only one column is selected from the join:


SQL> --********************************************************************************--
SQL> -- sub selecting only one column also fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select (select 1 from dual where 1 = 2) as exp_column
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;
select (select 1 from dual where 1 = 2) as exp_column
                      *
ERROR at line 1:
ORA-01792: maximum number of columns in a table or view is 1000 


SQL> 
SQL> drop table ORANGE;

Table dropped.

SQL> drop table MAUVE;

Table dropped.

SQL> drop table YELLOW;

Table dropped.

SQL> 

So it isn’t the star expansion causing issues, it appears to be the ANSI join. The original example doesn’t allow for successful execution of the dbms_utility.expand_sql_text procedure so the example is modified to create tables with 499 columns; the error no longer appears but dbms_utility.expand_sql_text reveals an interesting result:


SQL> --
SQL> -- Create 499 column tables so we can see the expansion problem
SQL> --
SQL> declare v_sql varchar2(32767);
  2  
  3  begin
  4  
  5    -- create test table ORANGE with 50 columns
  6    v_sql := 'create table ORANGE (Z_COL_001 number(9) not null';
  7    for i in 1 .. 498 loop
  8      v_sql := v_sql || ',' || chr(10) || 'Z_COL_' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
  9    end loop;
 10    v_sql := v_sql || ')';
 11    execute immediate v_sql;
 12  
 13    -- create test table MAUVE with 50 columns
 14  
 15    v_sql := 'create table MAUVE (Z_COL_001 number(9) not null';
 16    for i in 1 .. 498 loop
 17      v_sql := v_sql || ',' || chr(10) || 'T_COL__' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
 18    end loop;
 19    v_sql := v_sql || ')';
 20    execute immediate v_sql;
 21  
 22  end;
 23  /

PL/SQL procedure successfully completed.

SQL> 
SQL> -- create test table YELLOW with 2 columns
SQL> 
SQL> create table YELLOW (Z_COL_001 number(9) not null, P_COLUMN_002 varchar2(2));

Table created.

SQL> 
SQL> --********************************************************************************--
SQL> -- selecting one column work!
SQL> --********************************************************************************--
SQL> 
SQL> select p.P_COLUMN_002
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- notice the YELLOW table only has 2 columns, but selecting p.* fails in Oracle 12c:
SQL> -- when the joined tables have more than 499 columns each
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select p.*
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- Here's why:
SQL> --
SQL> -- When Oracle attempts an ANSI expansion of the code columns multiply in the ANSI
SQL> -- join and somehow appear to be associated with the various tables included in
SQL> -- the join
SQL> --********************************************************************************--
SQL> 
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2      m_sql_in    clob :=
  3                          '
  4                          select p.*
  5                          from ORANGE g
  6                          join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7                          join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8                          ';
  9  begin
 10  
 11      dbms_utility.expand_sql_text(
 12          m_sql_in,
 13          :m_sql_out
 14      );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT "A1"."Z_COL_001_998" "Z_COL_001","A1"."P_COLUMN_002_999" "P_COLUMN_002"  
FROM  (SELECT "A3"."Z_COL_001_0" "Z_COL_001","A3"."Z_COL_002_1"                 
"Z_COL_002","A3"."Z_COL_003_2" "Z_COL_003","A3"."Z_COL_004_3"                   
"Z_COL_004","A3"."Z_COL_005_4" "Z_COL_005","A3"."Z_COL_006_5"                   
"Z_COL_006","A3"."Z_COL_007_6" "Z_COL_007","A3"."Z_COL_008_7"                   
"Z_COL_008","A3"."Z_COL_009_8" "Z_COL_009","A3"."Z_COL_010_9"                   
"Z_COL_010","A3"."Z_COL_011_10" "Z_COL_011","A3"."Z_COL_012_11"                 
"Z_COL_012","A3"."Z_COL_013_12" "Z_COL_013","A3"."Z_COL_014_13"                 
"Z_COL_014","A3"."Z_COL_015_14" "Z_COL_015","A3"."Z_COL_016_15"                 
"Z_COL_016","A3"."Z_COL_017_16" "Z_COL_017","A3"."Z_COL_018_17"                 
"Z_COL_018","A3"."Z_COL_019_18" "Z_COL_019","A3"."Z_COL_020_19"                 
"Z_COL_020","A3"."Z_COL_021_20" "Z_COL_021","A3"."Z_COL_022_21"                 
"Z_COL_022","A3"."Z_COL_023_22" "Z_COL_023","A3"."Z_COL_024_23"                 
"Z_COL_024","A3"."Z_COL_025_24" "Z_COL_025","A3"."Z_COL_026_25"                 
"Z_COL_026","A3"."Z_COL_027_26" "Z_COL_027","A3"."Z_COL_028_27"                 
"Z_COL_028","A3"."Z_COL_029_28" "Z_COL_029","A3"."Z_COL_030_29"                 
"Z_COL_030","A3"."Z_COL_031_30" "Z_COL_031","A3"."Z_COL_032_31"                 
"Z_COL_032","A3"."Z_COL_033_32" "Z_COL_033","A3"."Z_COL_034_33"                 
"Z_COL_034","A3"."Z_COL_035_34" "Z_COL_035","A3"."Z_COL_036_35"                 
"Z_COL_036","A3"."Z_COL_037_36" "Z_COL_037","A3"."Z_COL_038_37"                 
"Z_COL_038","A3"."Z_COL_039_38" "Z_COL_039","A3"."Z_COL_040_39"                 
"Z_COL_040","A3"."Z_COL_041_40" "Z_COL_041","A3"."Z_COL_042_41"                 
"Z_COL_042","A3"."Z_COL_043_42" "Z_COL_043","A3"."Z_COL_044_43"                 
"Z_COL_044","A3"."Z_COL_045_44" "Z_COL_045","A3"."Z_COL_046_45"                 
"Z_COL_046","A3"."Z_COL_047_46" "Z_COL_047","A3"."Z_COL_048_47"                 
"Z_COL_048","A3"."Z_COL_049_48" "Z_COL_049","A3"."Z_COL_050_49"                 
"Z_COL_050","A3"."Z_COL_051_50" "Z_COL_051","A3"."Z_COL_052_51"                 
"Z_COL_052","A3"."Z_COL_053_52" "Z_COL_053","A3"."Z_COL_054_53"                 
"Z_COL_054","A3"."Z_COL_055_54" "Z_COL_055","A3"."Z_COL_056_55"                 
"Z_COL_056","A3"."Z_COL_057_56" "Z_COL_057","A3"."Z_COL_058_57"                 
"Z_COL_058","A3"."Z_COL_059_58" "Z_COL_059","A3"."Z_COL_060_59"                 
"Z_COL_060","A3"."Z_COL_061_60" "Z_COL_061","A3"."Z_COL_062_61"                 
"Z_COL_062","A3"."Z_COL_063_62" "Z_COL_063","A3"."Z_COL_064_63"                 
"Z_COL_064","A3"."Z_COL_065_64" "Z_COL_065","A3"."Z_COL_066_65"                 
"Z_COL_066","A3"."Z_COL_067_66" "Z_COL_067","A3"."Z_COL_068_67"                 
"Z_COL_068","A3"."Z_COL_069_68" "Z_COL_069","A3"."Z_COL_070_69"                 
"Z_COL_070","A3"."Z_COL_071_70" "Z_COL_071","A3"."Z_COL_072_71"                 
"Z_COL_072","A3"."Z_COL_073_72" "Z_COL_073","A3"."Z_COL_074_73"                 
"Z_COL_074","A3"."Z_COL_075_74" "Z_COL_075","A3"."Z_COL_076_75"                 
"Z_COL_076","A3"."Z_COL_077_76" "Z_COL_077","A3"."Z_COL_078_77"                 
"Z_COL_078","A3"."Z_COL_079_78" "Z_COL_079","A3"."Z_COL_080_79"                 
"Z_COL_080","A3"."Z_COL_081_80" "Z_COL_081","A3"."Z_COL_082_81"                 
"Z_COL_082","A3"."Z_COL_083_82" "Z_COL_083","A3"."Z_COL_084_83"                 
"Z_COL_084","A3"."Z_COL_085_84" "Z_COL_085","A3"."Z_COL_086_85"                 
"Z_COL_086","A3"."Z_COL_087_86" "Z_COL_087","A3"."Z_COL_088_87"                 
"Z_COL_088","A3"."Z_COL_089_88" "Z_COL_089","A3"."Z_COL_090_89"                 
"Z_COL_090","A3"."Z_COL_091_90" "Z_COL_091","A3"."Z_COL_092_91"                 
"Z_COL_092","A3"."Z_COL_093_92" "Z_COL_093","A3"."Z_COL_094_93"                 
"Z_COL_094","A3"."Z_COL_095_94" "Z_COL_095","A3"."Z_COL_096_95"                 
"Z_COL_096","A3"."Z_COL_097_96" "Z_COL_097","A3"."Z_COL_098_97"                 
"Z_COL_098","A3"."Z_COL_099_98" "Z_COL_099","A3"."Z_COL_100_99"                 
"Z_COL_100","A3"."Z_COL_101_100" "Z_COL_101","A3"."Z_COL_102_101"               
"Z_COL_102","A3"."Z_COL_103_102" "Z_COL_103","A3"."Z_COL_104_103"               
"Z_COL_104","A3"."Z_COL_105_104" "Z_COL_105","A3"."Z_COL_106_105"               
"Z_COL_106","A3"."Z_COL_107_106" "Z_COL_107","A3"."Z_COL_108_107"               
"Z_COL_108","A3"."Z_COL_109_108" "Z_COL_109","A3"."Z_COL_110_109"               
"Z_COL_110","A3"."Z_COL_111_110" "Z_COL_111","A3"."Z_COL_112_111"               
"Z_COL_112","A3"."Z_COL_113_112" "Z_COL_113","A3"."Z_COL_114_113"               
"Z_COL_114","A3"."Z_COL_115_114" "Z_COL_115","A3"."Z_COL_116_115"               
"Z_COL_116","A3"."Z_COL_117_116" "Z_COL_117","A3"."Z_COL_118_117"               
"Z_COL_118","A3"."Z_COL_119_118" "Z_COL_119","A3"."Z_COL_120_119"               
"Z_COL_120","A3"."Z_COL_121_120" "Z_COL_121","A3"."Z_COL_122_121"               
"Z_COL_122","A3"."Z_COL_123_122" "Z_COL_123","A3"."Z_COL_124_123"               
"Z_COL_124","A3"."Z_COL_125_124" "Z_COL_125","A3"."Z_COL_126_125"               
"Z_COL_126","A3"."Z_COL_127_126" "Z_COL_127","A3"."Z_COL_128_127"               
"Z_COL_128","A3"."Z_COL_129_128" "Z_COL_129","A3"."Z_COL_130_129"               
"Z_COL_130","A3"."Z_COL_131_130" "Z_COL_131","A3"."Z_COL_132_131"               
"Z_COL_132","A3"."Z_COL_133_132" "Z_COL_133","A3"."Z_COL_134_133"               
"Z_COL_134","A3"."Z_COL_135_134" "Z_COL_135","A3"."Z_COL_136_135"               
"Z_COL_136","A3"."Z_COL_137_136" "Z_COL_137","A3"."Z_COL_138_137"               
"Z_COL_138","A3"."Z_COL_139_138" "Z_COL_139","A3"."Z_COL_140_139"               
"Z_COL_140","A3"."Z_COL_141_140" "Z_COL_141","A3"."Z_COL_142_141"               
"Z_COL_142","A3"."Z_COL_143_142" "Z_COL_143","A3"."Z_COL_144_143"               
"Z_COL_144","A3"."Z_COL_145_144" "Z_COL_145","A3"."Z_COL_146_145"               
"Z_COL_146","A3"."Z_COL_147_146" "Z_COL_147","A3"."Z_COL_148_147"               
"Z_COL_148","A3"."Z_COL_149_148" "Z_COL_149","A3"."Z_COL_150_149"               
"Z_COL_150","A3"."Z_COL_151_150" "Z_COL_151","A3"."Z_COL_152_151"               
"Z_COL_152","A3"."Z_COL_153_152" "Z_COL_153","A3"."Z_COL_154_153"               
"Z_COL_154","A3"."Z_COL_155_154" "Z_COL_155","A3"."Z_COL_156_155"               
"Z_COL_156","A3"."Z_COL_157_156" "Z_COL_157","A3"."Z_COL_158_157"               
"Z_COL_158","A3"."Z_COL_159_158" "Z_COL_159","A3"."Z_COL_160_159"               
"Z_COL_160","A3"."Z_COL_161_160" "Z_COL_161","A3"."Z_COL_162_161"               
"Z_COL_162","A3"."Z_COL_163_162" "Z_COL_163","A3"."Z_COL_164_163"               
"Z_COL_164","A3"."Z_COL_165_164" "Z_COL_165","A3"."Z_COL_166_165"               
"Z_COL_166","A3"."Z_COL_167_166" "Z_COL_167","A3"."Z_COL_168_167"               
"Z_COL_168","A3"."Z_COL_169_168" "Z_COL_169","A3"."Z_COL_170_169"               
"Z_COL_170","A3"."Z_COL_171_170" "Z_COL_171","A3"."Z_COL_172_171"               
"Z_COL_172","A3"."Z_COL_173_172" "Z_COL_173","A3"."Z_COL_174_173"               
"Z_COL_174","A3"."Z_COL_175_174" "Z_COL_175","A3"."Z_COL_176_175"               
"Z_COL_176","A3"."Z_COL_177_176" "Z_COL_177","A3"."Z_COL_178_177"               
"Z_COL_178","A3"."Z_COL_179_178" "Z_COL_179","A3"."Z_COL_180_179"               
"Z_COL_180","A3"."Z_COL_181_180" "Z_COL_181","A3"."Z_COL_182_181"               
"Z_COL_182","A3"."Z_COL_183_182" "Z_COL_183","A3"."Z_COL_184_183"               
"Z_COL_184","A3"."Z_COL_185_184" "Z_COL_185","A3"."Z_COL_186_185"               
"Z_COL_186","A3"."Z_COL_187_186" "Z_COL_187","A3"."Z_COL_188_187"               
"Z_COL_188","A3"."Z_COL_189_188" "Z_COL_189","A3"."Z_COL_190_189"               
"Z_COL_190","A3"."Z_COL_191_190" "Z_COL_191","A3"."Z_COL_192_191"               
"Z_COL_192","A3"."Z_COL_193_192" "Z_COL_193","A3"."Z_COL_194_193"               
"Z_COL_194","A3"."Z_COL_195_194" "Z_COL_195","A3"."Z_COL_196_195"               
"Z_COL_196","A3"."Z_COL_197_196" "Z_COL_197","A3"."Z_COL_198_197"               
"Z_COL_198","A3"."Z_COL_199_198" "Z_COL_199","A3"."Z_COL_200_199"               
"Z_COL_200","A3"."Z_COL_201_200" "Z_COL_201","A3"."Z_COL_202_201"               
"Z_COL_202","A3"."Z_COL_203_202" "Z_COL_203","A3"."Z_COL_204_203"               
"Z_COL_204","A3"."Z_COL_205_204" "Z_COL_205","A3"."Z_COL_206_205"               
"Z_COL_206","A3"."Z_COL_207_206" "Z_COL_207","A3"."Z_COL_208_207"               
"Z_COL_208","A3"."Z_COL_209_208" "Z_COL_209","A3"."Z_COL_210_209"               
"Z_COL_210","A3"."Z_COL_211_210" "Z_COL_211","A3"."Z_COL_212_211"               
"Z_COL_212","A3"."Z_COL_213_212" "Z_COL_213","A3"."Z_COL_214_213"               
"Z_COL_214","A3"."Z_COL_215_214" "Z_COL_215","A3"."Z_COL_216_215"               
"Z_COL_216","A3"."Z_COL_217_216" "Z_COL_217","A3"."Z_COL_218_217"               
"Z_COL_218","A3"."Z_COL_219_218" "Z_COL_219","A3"."Z_COL_220_219"               
"Z_COL_220","A3"."Z_COL_221_220" "Z_COL_221","A3"."Z_COL_222_221"               
"Z_COL_222","A3"."Z_COL_223_222" "Z_COL_223","A3"."Z_COL_224_223"               
"Z_COL_224","A3"."Z_COL_225_224" "Z_COL_225","A3"."Z_COL_226_225"               
"Z_COL_226","A3"."Z_COL_227_226" "Z_COL_227","A3"."Z_COL_228_227"               
"Z_COL_228","A3"."Z_COL_229_228" "Z_COL_229","A3"."Z_COL_230_229"               
"Z_COL_230","A3"."Z_COL_231_230" "Z_COL_231","A3"."Z_COL_232_231"               
"Z_COL_232","A3"."Z_COL_233_232" "Z_COL_233","A3"."Z_COL_234_233"               
"Z_COL_234","A3"."Z_COL_235_234" "Z_COL_235","A3"."Z_COL_236_235"               
"Z_COL_236","A3"."Z_COL_237_236" "Z_COL_237","A3"."Z_COL_238_237"               
"Z_COL_238","A3"."Z_COL_239_238" "Z_COL_239","A3"."Z_COL_240_239"               
"Z_COL_240","A3"."Z_COL_241_240" "Z_COL_241","A3"."Z_COL_242_241"               
"Z_COL_242","A3"."Z_COL_243_242" "Z_COL_243","A3"."Z_COL_244_243"               
"Z_COL_244","A3"."Z_COL_245_244" "Z_COL_245","A3"."Z_COL_246_245"               
"Z_COL_246","A3"."Z_COL_247_246" "Z_COL_247","A3"."Z_COL_248_247"               
"Z_COL_248","A3"."Z_COL_249_248" "Z_COL_249","A3"."Z_COL_250_249"               
"Z_COL_250","A3"."Z_COL_251_250" "Z_COL_251","A3"."Z_COL_252_251"               
"Z_COL_252","A3"."Z_COL_253_252" "Z_COL_253","A3"."Z_COL_254_253"               
"Z_COL_254","A3"."Z_COL_255_254" "Z_COL_255","A3"."Z_COL_256_255"               
"Z_COL_256","A3"."Z_COL_257_256" "Z_COL_257","A3"."Z_COL_258_257"               
"Z_COL_258","A3"."Z_COL_259_258" "Z_COL_259","A3"."Z_COL_260_259"               
"Z_COL_260","A3"."Z_COL_261_260" "Z_COL_261","A3"."Z_COL_262_261"               
"Z_COL_262","A3"."Z_COL_263_262" "Z_COL_263","A3"."Z_COL_264_263"               
"Z_COL_264","A3"."Z_COL_265_264" "Z_COL_265","A3"."Z_COL_266_265"               
"Z_COL_266","A3"."Z_COL_267_266" "Z_COL_267","A3"."Z_COL_268_267"               
"Z_COL_268","A3"."Z_COL_269_268" "Z_COL_269","A3"."Z_COL_270_269"               
"Z_COL_270","A3"."Z_COL_271_270" "Z_COL_271","A3"."Z_COL_272_271"               
"Z_COL_272","A3"."Z_COL_273_272" "Z_COL_273","A3"."Z_COL_274_273"               
"Z_COL_274","A3"."Z_COL_275_274" "Z_COL_275","A3"."Z_COL_276_275"               
"Z_COL_276","A3"."Z_COL_277_276" "Z_COL_277","A3"."Z_COL_278_277"               
"Z_COL_278","A3"."Z_COL_279_278" "Z_COL_279","A3"."Z_COL_280_279"               
"Z_COL_280","A3"."Z_COL_281_280" "Z_COL_281","A3"."Z_COL_282_281"               
"Z_COL_282","A3"."Z_COL_283_282" "Z_COL_283","A3"."Z_COL_284_283"               
"Z_COL_284","A3"."Z_COL_285_284" "Z_COL_285","A3"."Z_COL_286_285"               
"Z_COL_286","A3"."Z_COL_287_286" "Z_COL_287","A3"."Z_COL_288_287"               
"Z_COL_288","A3"."Z_COL_289_288" "Z_COL_289","A3"."Z_COL_290_289"               
"Z_COL_290","A3"."Z_COL_291_290" "Z_COL_291","A3"."Z_COL_292_291"               
"Z_COL_292","A3"."Z_COL_293_292" "Z_COL_293","A3"."Z_COL_294_293"               
"Z_COL_294","A3"."Z_COL_295_294" "Z_COL_295","A3"."Z_COL_296_295"               
"Z_COL_296","A3"."Z_COL_297_296" "Z_COL_297","A3"."Z_COL_298_297"               
"Z_COL_298","A3"."Z_COL_299_298" "Z_COL_299","A3"."Z_COL_300_299"               
"Z_COL_300","A3"."Z_COL_301_300" "Z_COL_301","A3"."Z_COL_302_301"               
"Z_COL_302","A3"."Z_COL_303_302" "Z_COL_303","A3"."Z_COL_304_303"               
"Z_COL_304","A3"."Z_COL_305_304" "Z_COL_305","A3"."Z_COL_306_305"               
"Z_COL_306","A3"."Z_COL_307_306" "Z_COL_307","A3"."Z_COL_308_307"               
"Z_COL_308","A3"."Z_COL_309_308" "Z_COL_309","A3"."Z_COL_310_309"               
"Z_COL_310","A3"."Z_COL_311_310" "Z_COL_311","A3"."Z_COL_312_311"               
"Z_COL_312","A3"."Z_COL_313_312" "Z_COL_313","A3"."Z_COL_314_313"               
"Z_COL_314","A3"."Z_COL_315_314" "Z_COL_315","A3"."Z_COL_316_315"               
"Z_COL_316","A3"."Z_COL_317_316" "Z_COL_317","A3"."Z_COL_318_317"               
"Z_COL_318","A3"."Z_COL_319_318" "Z_COL_319","A3"."Z_COL_320_319"               
"Z_COL_320","A3"."Z_COL_321_320" "Z_COL_321","A3"."Z_COL_322_321"               
"Z_COL_322","A3"."Z_COL_323_322" "Z_COL_323","A3"."Z_COL_324_323"               
"Z_COL_324","A3"."Z_COL_325_324" "Z_COL_325","A3"."Z_COL_326_325"               
"Z_COL_326","A3"."Z_COL_327_326" "Z_COL_327","A3"."Z_COL_328_327"               
"Z_COL_328","A3"."Z_COL_329_328" "Z_COL_329","A3"."Z_COL_330_329"               
"Z_COL_330","A3"."Z_COL_331_330" "Z_COL_331","A3"."Z_COL_332_331"               
"Z_COL_332","A3"."Z_COL_333_332" "Z_COL_333","A3"."Z_COL_334_333"               
"Z_COL_334","A3"."Z_COL_335_334" "Z_COL_335","A3"."Z_COL_336_335"               
"Z_COL_336","A3"."Z_COL_337_336" "Z_COL_337","A3"."Z_COL_338_337"               
"Z_COL_338","A3"."Z_COL_339_338" "Z_COL_339","A3"."Z_COL_340_339"               
"Z_COL_340","A3"."Z_COL_341_340" "Z_COL_341","A3"."Z_COL_342_341"               
"Z_COL_342","A3"."Z_COL_343_342" "Z_COL_343","A3"."Z_COL_344_343"               
"Z_COL_344","A3"."Z_COL_345_344" "Z_COL_345","A3"."Z_COL_346_345"               
"Z_COL_346","A3"."Z_COL_347_346" "Z_COL_347","A3"."Z_COL_348_347"               
"Z_COL_348","A3"."Z_COL_349_348" "Z_COL_349","A3"."Z_COL_350_349"               
"Z_COL_350","A3"."Z_COL_351_350" "Z_COL_351","A3"."Z_COL_352_351"               
"Z_COL_352","A3"."Z_COL_353_352" "Z_COL_353","A3"."Z_COL_354_353"               
"Z_COL_354","A3"."Z_COL_355_354" "Z_COL_355","A3"."Z_COL_356_355"               
"Z_COL_356","A3"."Z_COL_357_356" "Z_COL_357","A3"."Z_COL_358_357"               
"Z_COL_358","A3"."Z_COL_359_358" "Z_COL_359","A3"."Z_COL_360_359"               
"Z_COL_360","A3"."Z_COL_361_360" "Z_COL_361","A3"."Z_COL_362_361"               
"Z_COL_362","A3"."Z_COL_363_362" "Z_COL_363","A3"."Z_COL_364_363"               
"Z_COL_364","A3"."Z_COL_365_364" "Z_COL_365","A3"."Z_COL_366_365"               
"Z_COL_366","A3"."Z_COL_367_366" "Z_COL_367","A3"."Z_COL_368_367"               
"Z_COL_368","A3"."Z_COL_369_368" "Z_COL_369","A3"."Z_COL_370_369"               
"Z_COL_370","A3"."Z_COL_371_370" "Z_COL_371","A3"."Z_COL_372_371"               
"Z_COL_372","A3"."Z_COL_373_372" "Z_COL_373","A3"."Z_COL_374_373"               
"Z_COL_374","A3"."Z_COL_375_374" "Z_COL_375","A3"."Z_COL_376_375"               
"Z_COL_376","A3"."Z_COL_377_376" "Z_COL_377","A3"."Z_COL_378_377"               
"Z_COL_378","A3"."Z_COL_379_378" "Z_COL_379","A3"."Z_COL_380_379"               
"Z_COL_380","A3"."Z_COL_381_380" "Z_COL_381","A3"."Z_COL_382_381"               
"Z_COL_382","A3"."Z_COL_383_382" "Z_COL_383","A3"."Z_COL_384_383"               
"Z_COL_384","A3"."Z_COL_385_384" "Z_COL_385","A3"."Z_COL_386_385"               
"Z_COL_386","A3"."Z_COL_387_386" "Z_COL_387","A3"."Z_COL_388_387"               
"Z_COL_388","A3"."Z_COL_389_388" "Z_COL_389","A3"."Z_COL_390_389"               
"Z_COL_390","A3"."Z_COL_391_390" "Z_COL_391","A3"."Z_COL_392_391"               
"Z_COL_392","A3"."Z_COL_393_392" "Z_COL_393","A3"."Z_COL_394_393"               
"Z_COL_394","A3"."Z_COL_395_394" "Z_COL_395","A3"."Z_COL_396_395"               
"Z_COL_396","A3"."Z_COL_397_396" "Z_COL_397","A3"."Z_COL_398_397"               
"Z_COL_398","A3"."Z_COL_399_398" "Z_COL_399","A3"."Z_COL_400_399"               
"Z_COL_400","A3"."Z_COL_401_400" "Z_COL_401","A3"."Z_COL_402_401"               
"Z_COL_402","A3"."Z_COL_403_402" "Z_COL_403","A3"."Z_COL_404_403"               
"Z_COL_404","A3"."Z_COL_405_404" "Z_COL_405","A3"."Z_COL_406_405"               
"Z_COL_406","A3"."Z_COL_407_406" "Z_COL_407","A3"."Z_COL_408_407"               
"Z_COL_408","A3"."Z_COL_409_408" "Z_COL_409","A3"."Z_COL_410_409"               
"Z_COL_410","A3"."Z_COL_411_410" "Z_COL_411","A3"."Z_COL_412_411"               
"Z_COL_412","A3"."Z_COL_413_412" "Z_COL_413","A3"."Z_COL_414_413"               
"Z_COL_414","A3"."Z_COL_415_414" "Z_COL_415","A3"."Z_COL_416_415"               
"Z_COL_416","A3"."Z_COL_417_416" "Z_COL_417","A3"."Z_COL_418_417"               
"Z_COL_418","A3"."Z_COL_419_418" "Z_COL_419","A3"."Z_COL_420_419"               
"Z_COL_420","A3"."Z_COL_421_420" "Z_COL_421","A3"."Z_COL_422_421"               
"Z_COL_422","A3"."Z_COL_423_422" "Z_COL_423","A3"."Z_COL_424_423"               
"Z_COL_424","A3"."Z_COL_425_424" "Z_COL_425","A3"."Z_COL_426_425"               
"Z_COL_426","A3"."Z_COL_427_426" "Z_COL_427","A3"."Z_COL_428_427"               
"Z_COL_428","A3"."Z_COL_429_428" "Z_COL_429","A3"."Z_COL_430_429"               
"Z_COL_430","A3"."Z_COL_431_430" "Z_COL_431","A3"."Z_COL_432_431"               
"Z_COL_432","A3"."Z_COL_433_432" "Z_COL_433","A3"."Z_COL_434_433"               
"Z_COL_434","A3"."Z_COL_435_434" "Z_COL_435","A3"."Z_COL_436_435"               
"Z_COL_436","A3"."Z_COL_437_436" "Z_COL_437","A3"."Z_COL_438_437"               
"Z_COL_438","A3"."Z_COL_439_438" "Z_COL_439","A3"."Z_COL_440_439"               
"Z_COL_440","A3"."Z_COL_441_440" "Z_COL_441","A3"."Z_COL_442_441"               
"Z_COL_442","A3"."Z_COL_443_442" "Z_COL_443","A3"."Z_COL_444_443"               
"Z_COL_444","A3"."Z_COL_445_444" "Z_COL_445","A3"."Z_COL_446_445"               
"Z_COL_446","A3"."Z_COL_447_446" "Z_COL_447","A3"."Z_COL_448_447"               
"Z_COL_448","A3"."Z_COL_449_448" "Z_COL_449","A3"."Z_COL_450_449"               
"Z_COL_450","A3"."Z_COL_451_450" "Z_COL_451","A3"."Z_COL_452_451"               
"Z_COL_452","A3"."Z_COL_453_452" "Z_COL_453","A3"."Z_COL_454_453"               
"Z_COL_454","A3"."Z_COL_455_454" "Z_COL_455","A3"."Z_COL_456_455"               
"Z_COL_456","A3"."Z_COL_457_456" "Z_COL_457","A3"."Z_COL_458_457"               
"Z_COL_458","A3"."Z_COL_459_458" "Z_COL_459","A3"."Z_COL_460_459"               
"Z_COL_460","A3"."Z_COL_461_460" "Z_COL_461","A3"."Z_COL_462_461"               
"Z_COL_462","A3"."Z_COL_463_462" "Z_COL_463","A3"."Z_COL_464_463"               
"Z_COL_464","A3"."Z_COL_465_464" "Z_COL_465","A3"."Z_COL_466_465"               
"Z_COL_466","A3"."Z_COL_467_466" "Z_COL_467","A3"."Z_COL_468_467"               
"Z_COL_468","A3"."Z_COL_469_468" "Z_COL_469","A3"."Z_COL_470_469"               
"Z_COL_470","A3"."Z_COL_471_470" "Z_COL_471","A3"."Z_COL_472_471"               
"Z_COL_472","A3"."Z_COL_473_472" "Z_COL_473","A3"."Z_COL_474_473"               
"Z_COL_474","A3"."Z_COL_475_474" "Z_COL_475","A3"."Z_COL_476_475"               
"Z_COL_476","A3"."Z_COL_477_476" "Z_COL_477","A3"."Z_COL_478_477"               
"Z_COL_478","A3"."Z_COL_479_478" "Z_COL_479","A3"."Z_COL_480_479"               
"Z_COL_480","A3"."Z_COL_481_480" "Z_COL_481","A3"."Z_COL_482_481"               
"Z_COL_482","A3"."Z_COL_483_482" "Z_COL_483","A3"."Z_COL_484_483"               
"Z_COL_484","A3"."Z_COL_485_484" "Z_COL_485","A3"."Z_COL_486_485"               
"Z_COL_486","A3"."Z_COL_487_486" "Z_COL_487","A3"."Z_COL_488_487"               
"Z_COL_488","A3"."Z_COL_489_488" "Z_COL_489","A3"."Z_COL_490_489"               
"Z_COL_490","A3"."Z_COL_491_490" "Z_COL_491","A3"."Z_COL_492_491"               
"Z_COL_492","A3"."Z_COL_493_492" "Z_COL_493","A3"."Z_COL_494_493"               
"Z_COL_494","A3"."Z_COL_495_494" "Z_COL_495","A3"."Z_COL_496_495"               
"Z_COL_496","A3"."Z_COL_497_496" "Z_COL_497","A3"."Z_COL_498_497"               
"Z_COL_498","A3"."Z_COL_499_498" "Z_COL_499","A3"."Z_COL_001_499"               
"Z_COL_001","A3"."T_COL__002_500" "T_COL__002","A3"."T_COL__003_501"            
"T_COL__003","A3"."T_COL__004_502" "T_COL__004","A3"."T_COL__005_503"           
"T_COL__005","A3"."T_COL__006_504" "T_COL__006","A3"."T_COL__007_505"           
"T_COL__007","A3"."T_COL__008_506" "T_COL__008","A3"."T_COL__009_507"           
"T_COL__009","A3"."T_COL__010_508" "T_COL__010","A3"."T_COL__011_509"           
"T_COL__011","A3"."T_COL__012_510" "T_COL__012","A3"."T_COL__013_511"           
"T_COL__013","A3"."T_COL__014_512" "T_COL__014","A3"."T_COL__015_513"           
"T_COL__015","A3"."T_COL__016_514" "T_COL__016","A3"."T_COL__017_515"           
"T_COL__017","A3"."T_COL__018_516" "T_COL__018","A3"."T_COL__019_517"           
"T_COL__019","A3"."T_COL__020_518" "T_COL__020","A3"."T_COL__021_519"           
"T_COL__021","A3"."T_COL__022_520" "T_COL__022","A3"."T_COL__023_521"           
"T_COL__023","A3"."T_COL__024_522" "T_COL__024","A3"."T_COL__025_523"           
"T_COL__025","A3"."T_COL__026_524" "T_COL__026","A3"."T_COL__027_525"           
"T_COL__027","A3"."T_COL__028_526" "T_COL__028","A3"."T_COL__029_527"           
"T_COL__029","A3"."T_COL__030_528" "T_COL__030","A3"."T_COL__031_529"           
"T_COL__031","A3"."T_COL__032_530" "T_COL__032","A3"."T_COL__033_531"           
"T_COL__033","A3"."T_COL__034_532" "T_COL__034","A3"."T_COL__035_533"           
"T_COL__035","A3"."T_COL__036_534" "T_COL__036","A3"."T_COL__037_535"           
"T_COL__037","A3"."T_COL__038_536" "T_COL__038","A3"."T_COL__039_537"           
"T_COL__039","A3"."T_COL__040_538" "T_COL__040","A3"."T_COL__041_539"           
"T_COL__041","A3"."T_COL__042_540" "T_COL__042","A3"."T_COL__043_541"           
"T_COL__043","A3"."T_COL__044_542" "T_COL__044","A3"."T_COL__045_543"           
"T_COL__045","A3"."T_COL__046_544" "T_COL__046","A3"."T_COL__047_545"           
"T_COL__047","A3"."T_COL__048_546" "T_COL__048","A3"."T_COL__049_547"           
"T_COL__049","A3"."T_COL__050_548" "T_COL__050","A3"."T_COL__051_549"           
"T_COL__051","A3"."T_COL__052_550" "T_COL__052","A3"."T_COL__053_551"           
"T_COL__053","A3"."T_COL__054_552" "T_COL__054","A3"."T_COL__055_553"           
"T_COL__055","A3"."T_COL__056_554" "T_COL__056","A3"."T_COL__057_555"           
"T_COL__057","A3"."T_COL__058_556" "T_COL__058","A3"."T_COL__059_557"           
"T_COL__059","A3"."T_COL__060_558" "T_COL__060","A3"."T_COL__061_559"           
"T_COL__061","A3"."T_COL__062_560" "T_COL__062","A3"."T_COL__063_561"           
"T_COL__063","A3"."T_COL__064_562" "T_COL__064","A3"."T_COL__065_563"           
"T_COL__065","A3"."T_COL__066_564" "T_COL__066","A3"."T_COL__067_565"           
"T_COL__067","A3"."T_COL__068_566" "T_COL__068","A3"."T_COL__069_567"           
"T_COL__069","A3"."T_COL__070_568" "T_COL__070","A3"."T_COL__071_569"           
"T_COL__071","A3"."T_COL__072_570" "T_COL__072","A3"."T_COL__073_571"           
"T_COL__073","A3"."T_COL__074_572" "T_COL__074","A3"."T_COL__075_573"           
"T_COL__075","A3"."T_COL__076_574" "T_COL__076","A3"."T_COL__077_575"           
"T_COL__077","A3"."T_COL__078_576" "T_COL__078","A3"."T_COL__079_577"           
"T_COL__079","A3"."T_COL__080_578" "T_COL__080","A3"."T_COL__081_579"           
"T_COL__081","A3"."T_COL__082_580" "T_COL__082","A3"."T_COL__083_581"           
"T_COL__083","A3"."T_COL__084_582" "T_COL__084","A3"."T_COL__085_583"           
"T_COL__085","A3"."T_COL__086_584" "T_COL__086","A3"."T_COL__087_585"           
"T_COL__087","A3"."T_COL__088_586" "T_COL__088","A3"."T_COL__089_587"           
"T_COL__089","A3"."T_COL__090_588" "T_COL__090","A3"."T_COL__091_589"           
"T_COL__091","A3"."T_COL__092_590" "T_COL__092","A3"."T_COL__093_591"           
"T_COL__093","A3"."T_COL__094_592" "T_COL__094","A3"."T_COL__095_593"           
"T_COL__095","A3"."T_COL__096_594" "T_COL__096","A3"."T_COL__097_595"           
"T_COL__097","A3"."T_COL__098_596" "T_COL__098","A3"."T_COL__099_597"           
"T_COL__099","A3"."T_COL__100_598" "T_COL__100","A3"."T_COL__101_599"           
"T_COL__101","A3"."T_COL__102_                                                  
                                                                                

The output generated by the procedure is cut short and doesn’t provide the full expansion list, however it should be easily seen that Oracle is doing something ‘interesting’ when expanding the ANSI join. Again, it doesn’t occur just with ‘select *’ queries, as a single-column subquery also produces the same results:


SQL> 
SQL> --********************************************************************************--
SQL> -- sub selecting only one column also fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select (select 1 from dual where 1 = 2) as exp_column
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- The same occurs here
SQL> -- Because of the errant expansion the total number of columns expands to just under
SQL> -- the query limit so that even selecting 1 column from causes the error to occur
SQL> --********************************************************************************--
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2      m_sql_in    clob :=
  3                          '
  4                          select (select 1 from dual where 1 = 2) as exp_column
  5                          from ORANGE g
  6                          join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7                          join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8                          ';
  9  begin
 10  
 11      dbms_utility.expand_sql_text(
 12          m_sql_in,
 13          :m_sql_out
 14      );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT  (SELECT 1 "1" FROM "SYS"."DUAL" "A2" WHERE 1=2) "EXP_COLUMN" FROM       
(SELECT "A4"."Z_COL_001_0" "Z_COL_001","A4"."Z_COL_002_1"                       
"Z_COL_002","A4"."Z_COL_003_2" "Z_COL_003","A4"."Z_COL_004_3"                   
"Z_COL_004","A4"."Z_COL_005_4" "Z_COL_005","A4"."Z_COL_006_5"                   
"Z_COL_006","A4"."Z_COL_007_6" "Z_COL_007","A4"."Z_COL_008_7"                   
"Z_COL_008","A4"."Z_COL_009_8" "Z_COL_009","A4"."Z_COL_010_9"                   
"Z_COL_010","A4"."Z_COL_011_10" "Z_COL_011","A4"."Z_COL_012_11"                 
"Z_COL_012","A4"."Z_COL_013_12" "Z_COL_013","A4"."Z_COL_014_13"                 
"Z_COL_014","A4"."Z_COL_015_14" "Z_COL_015","A4"."Z_COL_016_15"                 
"Z_COL_016","A4"."Z_COL_017_16" "Z_COL_017","A4"."Z_COL_018_17"                 
"Z_COL_018","A4"."Z_COL_019_18" "Z_COL_019","A4"."Z_COL_020_19"                 
"Z_COL_020","A4"."Z_COL_021_20" "Z_COL_021","A4"."Z_COL_022_21"                 
"Z_COL_022","A4"."Z_COL_023_22" "Z_COL_023","A4"."Z_COL_024_23"                 
"Z_COL_024","A4"."Z_COL_025_24" "Z_COL_025","A4"."Z_COL_026_25"                 
"Z_COL_026","A4"."Z_COL_027_26" "Z_COL_027","A4"."Z_COL_028_27"                 
"Z_COL_028","A4"."Z_COL_029_28" "Z_COL_029","A4"."Z_COL_030_29"                 
"Z_COL_030","A4"."Z_COL_031_30" "Z_COL_031","A4"."Z_COL_032_31"                 
"Z_COL_032","A4"."Z_COL_033_32" "Z_COL_033","A4"."Z_COL_034_33"                 
"Z_COL_034","A4"."Z_COL_035_34" "Z_COL_035","A4"."Z_COL_036_35"                 
"Z_COL_036","A4"."Z_COL_037_36" "Z_COL_037","A4"."Z_COL_038_37"                 
"Z_COL_038","A4"."Z_COL_039_38" "Z_COL_039","A4"."Z_COL_040_39"                 
"Z_COL_040","A4"."Z_COL_041_40" "Z_COL_041","A4"."Z_COL_042_41"                 
"Z_COL_042","A4"."Z_COL_043_42" "Z_COL_043","A4"."Z_COL_044_43"                 
"Z_COL_044","A4"."Z_COL_045_44" "Z_COL_045","A4"."Z_COL_046_45"                 
"Z_COL_046","A4"."Z_COL_047_46" "Z_COL_047","A4"."Z_COL_048_47"                 
"Z_COL_048","A4"."Z_COL_049_48" "Z_COL_049","A4"."Z_COL_050_49"                 
"Z_COL_050","A4"."Z_COL_051_50" "Z_COL_051","A4"."Z_COL_052_51"                 
"Z_COL_052","A4"."Z_COL_053_52" "Z_COL_053","A4"."Z_COL_054_53"                 
"Z_COL_054","A4"."Z_COL_055_54" "Z_COL_055","A4"."Z_COL_056_55"                 
"Z_COL_056","A4"."Z_COL_057_56" "Z_COL_057","A4"."Z_COL_058_57"                 
"Z_COL_058","A4"."Z_COL_059_58" "Z_COL_059","A4"."Z_COL_060_59"                 
"Z_COL_060","A4"."Z_COL_061_60" "Z_COL_061","A4"."Z_COL_062_61"                 
"Z_COL_062","A4"."Z_COL_063_62" "Z_COL_063","A4"."Z_COL_064_63"                 
"Z_COL_064","A4"."Z_COL_065_64" "Z_COL_065","A4"."Z_COL_066_65"                 
"Z_COL_066","A4"."Z_COL_067_66" "Z_COL_067","A4"."Z_COL_068_67"                 
"Z_COL_068","A4"."Z_COL_069_68" "Z_COL_069","A4"."Z_COL_070_69"                 
"Z_COL_070","A4"."Z_COL_071_70" "Z_COL_071","A4"."Z_COL_072_71"                 
"Z_COL_072","A4"."Z_COL_073_72" "Z_COL_073","A4"."Z_COL_074_73"                 
"Z_COL_074","A4"."Z_COL_075_74" "Z_COL_075","A4"."Z_COL_076_75"                 
"Z_COL_076","A4"."Z_COL_077_76" "Z_COL_077","A4"."Z_COL_078_77"                 
"Z_COL_078","A4"."Z_COL_079_78" "Z_COL_079","A4"."Z_COL_080_79"                 
"Z_COL_080","A4"."Z_COL_081_80" "Z_COL_081","A4"."Z_COL_082_81"                 
"Z_COL_082","A4"."Z_COL_083_82" "Z_COL_083","A4"."Z_COL_084_83"                 
"Z_COL_084","A4"."Z_COL_085_84" "Z_COL_085","A4"."Z_COL_086_85"                 
"Z_COL_086","A4"."Z_COL_087_86" "Z_COL_087","A4"."Z_COL_088_87"                 
"Z_COL_088","A4"."Z_COL_089_88" "Z_COL_089","A4"."Z_COL_090_89"                 
"Z_COL_090","A4"."Z_COL_091_90" "Z_COL_091","A4"."Z_COL_092_91"                 
"Z_COL_092","A4"."Z_COL_093_92" "Z_COL_093","A4"."Z_COL_094_93"                 
"Z_COL_094","A4"."Z_COL_095_94" "Z_COL_095","A4"."Z_COL_096_95"                 
"Z_COL_096","A4"."Z_COL_097_96" "Z_COL_097","A4"."Z_COL_098_97"                 
"Z_COL_098","A4"."Z_COL_099_98" "Z_COL_099","A4"."Z_COL_100_99"                 
"Z_COL_100","A4"."Z_COL_101_100" "Z_COL_101","A4"."Z_COL_102_101"               
"Z_COL_102","A4"."Z_COL_103_102" "Z_COL_103","A4"."Z_COL_104_103"               
"Z_COL_104","A4"."Z_COL_105_104" "Z_COL_105","A4"."Z_COL_106_105"               
"Z_COL_106","A4"."Z_COL_107_106" "Z_COL_107","A4"."Z_COL_108_107"               
"Z_COL_108","A4"."Z_COL_109_108" "Z_COL_109","A4"."Z_COL_110_109"               
"Z_COL_110","A4"."Z_COL_111_110" "Z_COL_111","A4"."Z_COL_112_111"               
"Z_COL_112","A4"."Z_COL_113_112" "Z_COL_113","A4"."Z_COL_114_113"               
"Z_COL_114","A4"."Z_COL_115_114" "Z_COL_115","A4"."Z_COL_116_115"               
"Z_COL_116","A4"."Z_COL_117_116" "Z_COL_117","A4"."Z_COL_118_117"               
"Z_COL_118","A4"."Z_COL_119_118" "Z_COL_119","A4"."Z_COL_120_119"               
"Z_COL_120","A4"."Z_COL_121_120" "Z_COL_121","A4"."Z_COL_122_121"               
"Z_COL_122","A4"."Z_COL_123_122" "Z_COL_123","A4"."Z_COL_124_123"               
"Z_COL_124","A4"."Z_COL_125_124" "Z_COL_125","A4"."Z_COL_126_125"               
"Z_COL_126","A4"."Z_COL_127_126" "Z_COL_127","A4"."Z_COL_128_127"               
"Z_COL_128","A4"."Z_COL_129_128" "Z_COL_129","A4"."Z_COL_130_129"               
"Z_COL_130","A4"."Z_COL_131_130" "Z_COL_131","A4"."Z_COL_132_131"               
"Z_COL_132","A4"."Z_COL_133_132" "Z_COL_133","A4"."Z_COL_134_133"               
"Z_COL_134","A4"."Z_COL_135_134" "Z_COL_135","A4"."Z_COL_136_135"               
"Z_COL_136","A4"."Z_COL_137_136" "Z_COL_137","A4"."Z_COL_138_137"               
"Z_COL_138","A4"."Z_COL_139_138" "Z_COL_139","A4"."Z_COL_140_139"               
"Z_COL_140","A4"."Z_COL_141_140" "Z_COL_141","A4"."Z_COL_142_141"               
"Z_COL_142","A4"."Z_COL_143_142" "Z_COL_143","A4"."Z_COL_144_143"               
"Z_COL_144","A4"."Z_COL_145_144" "Z_COL_145","A4"."Z_COL_146_145"               
"Z_COL_146","A4"."Z_COL_147_146" "Z_COL_147","A4"."Z_COL_148_147"               
"Z_COL_148","A4"."Z_COL_149_148" "Z_COL_149","A4"."Z_COL_150_149"               
"Z_COL_150","A4"."Z_COL_151_150" "Z_COL_151","A4"."Z_COL_152_151"               
"Z_COL_152","A4"."Z_COL_153_152" "Z_COL_153","A4"."Z_COL_154_153"               
"Z_COL_154","A4"."Z_COL_155_154" "Z_COL_155","A4"."Z_COL_156_155"               
"Z_COL_156","A4"."Z_COL_157_156" "Z_COL_157","A4"."Z_COL_158_157"               
"Z_COL_158","A4"."Z_COL_159_158" "Z_COL_159","A4"."Z_COL_160_159"               
"Z_COL_160","A4"."Z_COL_161_160" "Z_COL_161","A4"."Z_COL_162_161"               
"Z_COL_162","A4"."Z_COL_163_162" "Z_COL_163","A4"."Z_COL_164_163"               
"Z_COL_164","A4"."Z_COL_165_164" "Z_COL_165","A4"."Z_COL_166_165"               
"Z_COL_166","A4"."Z_COL_167_166" "Z_COL_167","A4"."Z_COL_168_167"               
"Z_COL_168","A4"."Z_COL_169_168" "Z_COL_169","A4"."Z_COL_170_169"               
"Z_COL_170","A4"."Z_COL_171_170" "Z_COL_171","A4"."Z_COL_172_171"               
"Z_COL_172","A4"."Z_COL_173_172" "Z_COL_173","A4"."Z_COL_174_173"               
"Z_COL_174","A4"."Z_COL_175_174" "Z_COL_175","A4"."Z_COL_176_175"               
"Z_COL_176","A4"."Z_COL_177_176" "Z_COL_177","A4"."Z_COL_178_177"               
"Z_COL_178","A4"."Z_COL_179_178" "Z_COL_179","A4"."Z_COL_180_179"               
"Z_COL_180","A4"."Z_COL_181_180" "Z_COL_181","A4"."Z_COL_182_181"               
"Z_COL_182","A4"."Z_COL_183_182" "Z_COL_183","A4"."Z_COL_184_183"               
"Z_COL_184","A4"."Z_COL_185_184" "Z_COL_185","A4"."Z_COL_186_185"               
"Z_COL_186","A4"."Z_COL_187_186" "Z_COL_187","A4"."Z_COL_188_187"               
"Z_COL_188","A4"."Z_COL_189_188" "Z_COL_189","A4"."Z_COL_190_189"               
"Z_COL_190","A4"."Z_COL_191_190" "Z_COL_191","A4"."Z_COL_192_191"               
"Z_COL_192","A4"."Z_COL_193_192" "Z_COL_193","A4"."Z_COL_194_193"               
"Z_COL_194","A4"."Z_COL_195_194" "Z_COL_195","A4"."Z_COL_196_195"               
"Z_COL_196","A4"."Z_COL_197_196" "Z_COL_197","A4"."Z_COL_198_197"               
"Z_COL_198","A4"."Z_COL_199_198" "Z_COL_199","A4"."Z_COL_200_199"               
"Z_COL_200","A4"."Z_COL_201_200" "Z_COL_201","A4"."Z_COL_202_201"               
"Z_COL_202","A4"."Z_COL_203_202" "Z_COL_203","A4"."Z_COL_204_203"               
"Z_COL_204","A4"."Z_COL_205_204" "Z_COL_205","A4"."Z_COL_206_205"               
"Z_COL_206","A4"."Z_COL_207_206" "Z_COL_207","A4"."Z_COL_208_207"               
"Z_COL_208","A4"."Z_COL_209_208" "Z_COL_209","A4"."Z_COL_210_209"               
"Z_COL_210","A4"."Z_COL_211_210" "Z_COL_211","A4"."Z_COL_212_211"               
"Z_COL_212","A4"."Z_COL_213_212" "Z_COL_213","A4"."Z_COL_214_213"               
"Z_COL_214","A4"."Z_COL_215_214" "Z_COL_215","A4"."Z_COL_216_215"               
"Z_COL_216","A4"."Z_COL_217_216" "Z_COL_217","A4"."Z_COL_218_217"               
"Z_COL_218","A4"."Z_COL_219_218" "Z_COL_219","A4"."Z_COL_220_219"               
"Z_COL_220","A4"."Z_COL_221_220" "Z_COL_221","A4"."Z_COL_222_221"               
"Z_COL_222","A4"."Z_COL_223_222" "Z_COL_223","A4"."Z_COL_224_223"               
"Z_COL_224","A4"."Z_COL_225_224" "Z_COL_225","A4"."Z_COL_226_225"               
"Z_COL_226","A4"."Z_COL_227_226" "Z_COL_227","A4"."Z_COL_228_227"               
"Z_COL_228","A4"."Z_COL_229_228" "Z_COL_229","A4"."Z_COL_230_229"               
"Z_COL_230","A4"."Z_COL_231_230" "Z_COL_231","A4"."Z_COL_232_231"               
"Z_COL_232","A4"."Z_COL_233_232" "Z_COL_233","A4"."Z_COL_234_233"               
"Z_COL_234","A4"."Z_COL_235_234" "Z_COL_235","A4"."Z_COL_236_235"               
"Z_COL_236","A4"."Z_COL_237_236" "Z_COL_237","A4"."Z_COL_238_237"               
"Z_COL_238","A4"."Z_COL_239_238" "Z_COL_239","A4"."Z_COL_240_239"               
"Z_COL_240","A4"."Z_COL_241_240" "Z_COL_241","A4"."Z_COL_242_241"               
"Z_COL_242","A4"."Z_COL_243_242" "Z_COL_243","A4"."Z_COL_244_243"               
"Z_COL_244","A4"."Z_COL_245_244" "Z_COL_245","A4"."Z_COL_246_245"               
"Z_COL_246","A4"."Z_COL_247_246" "Z_COL_247","A4"."Z_COL_248_247"               
"Z_COL_248","A4"."Z_COL_249_248" "Z_COL_249","A4"."Z_COL_250_249"               
"Z_COL_250","A4"."Z_COL_251_250" "Z_COL_251","A4"."Z_COL_252_251"               
"Z_COL_252","A4"."Z_COL_253_252" "Z_COL_253","A4"."Z_COL_254_253"               
"Z_COL_254","A4"."Z_COL_255_254" "Z_COL_255","A4"."Z_COL_256_255"               
"Z_COL_256","A4"."Z_COL_257_256" "Z_COL_257","A4"."Z_COL_258_257"               
"Z_COL_258","A4"."Z_COL_259_258" "Z_COL_259","A4"."Z_COL_260_259"               
"Z_COL_260","A4"."Z_COL_261_260" "Z_COL_261","A4"."Z_COL_262_261"               
"Z_COL_262","A4"."Z_COL_263_262" "Z_COL_263","A4"."Z_COL_264_263"               
"Z_COL_264","A4"."Z_COL_265_264" "Z_COL_265","A4"."Z_COL_266_265"               
"Z_COL_266","A4"."Z_COL_267_266" "Z_COL_267","A4"."Z_COL_268_267"               
"Z_COL_268","A4"."Z_COL_269_268" "Z_COL_269","A4"."Z_COL_270_269"               
"Z_COL_270","A4"."Z_COL_271_270" "Z_COL_271","A4"."Z_COL_272_271"               
"Z_COL_272","A4"."Z_COL_273_272" "Z_COL_273","A4"."Z_COL_274_273"               
"Z_COL_274","A4"."Z_COL_275_274" "Z_COL_275","A4"."Z_COL_276_275"               
"Z_COL_276","A4"."Z_COL_277_276" "Z_COL_277","A4"."Z_COL_278_277"               
"Z_COL_278","A4"."Z_COL_279_278" "Z_COL_279","A4"."Z_COL_280_279"               
"Z_COL_280","A4"."Z_COL_281_280" "Z_COL_281","A4"."Z_COL_282_281"               
"Z_COL_282","A4"."Z_COL_283_282" "Z_COL_283","A4"."Z_COL_284_283"               
"Z_COL_284","A4"."Z_COL_285_284" "Z_COL_285","A4"."Z_COL_286_285"               
"Z_COL_286","A4"."Z_COL_287_286" "Z_COL_287","A4"."Z_COL_288_287"               
"Z_COL_288","A4"."Z_COL_289_288" "Z_COL_289","A4"."Z_COL_290_289"               
"Z_COL_290","A4"."Z_COL_291_290" "Z_COL_291","A4"."Z_COL_292_291"               
"Z_COL_292","A4"."Z_COL_293_292" "Z_COL_293","A4"."Z_COL_294_293"               
"Z_COL_294","A4"."Z_COL_295_294" "Z_COL_295","A4"."Z_COL_296_295"               
"Z_COL_296","A4"."Z_COL_297_296" "Z_COL_297","A4"."Z_COL_298_297"               
"Z_COL_298","A4"."Z_COL_299_298" "Z_COL_299","A4"."Z_COL_300_299"               
"Z_COL_300","A4"."Z_COL_301_300" "Z_COL_301","A4"."Z_COL_302_301"               
"Z_COL_302","A4"."Z_COL_303_302" "Z_COL_303","A4"."Z_COL_304_303"               
"Z_COL_304","A4"."Z_COL_305_304" "Z_COL_305","A4"."Z_COL_306_305"               
"Z_COL_306","A4"."Z_COL_307_306" "Z_COL_307","A4"."Z_COL_308_307"               
"Z_COL_308","A4"."Z_COL_309_308" "Z_COL_309","A4"."Z_COL_310_309"               
"Z_COL_310","A4"."Z_COL_311_310" "Z_COL_311","A4"."Z_COL_312_311"               
"Z_COL_312","A4"."Z_COL_313_312" "Z_COL_313","A4"."Z_COL_314_313"               
"Z_COL_314","A4"."Z_COL_315_314" "Z_COL_315","A4"."Z_COL_316_315"               
"Z_COL_316","A4"."Z_COL_317_316" "Z_COL_317","A4"."Z_COL_318_317"               
"Z_COL_318","A4"."Z_COL_319_318" "Z_COL_319","A4"."Z_COL_320_319"               
"Z_COL_320","A4"."Z_COL_321_320" "Z_COL_321","A4"."Z_COL_322_321"               
"Z_COL_322","A4"."Z_COL_323_322" "Z_COL_323","A4"."Z_COL_324_323"               
"Z_COL_324","A4"."Z_COL_325_324" "Z_COL_325","A4"."Z_COL_326_325"               
"Z_COL_326","A4"."Z_COL_327_326" "Z_COL_327","A4"."Z_COL_328_327"               
"Z_COL_328","A4"."Z_COL_329_328" "Z_COL_329","A4"."Z_COL_330_329"               
"Z_COL_330","A4"."Z_COL_331_330" "Z_COL_331","A4"."Z_COL_332_331"               
"Z_COL_332","A4"."Z_COL_333_332" "Z_COL_333","A4"."Z_COL_334_333"               
"Z_COL_334","A4"."Z_COL_335_334" "Z_COL_335","A4"."Z_COL_336_335"               
"Z_COL_336","A4"."Z_COL_337_336" "Z_COL_337","A4"."Z_COL_338_337"               
"Z_COL_338","A4"."Z_COL_339_338" "Z_COL_339","A4"."Z_COL_340_339"               
"Z_COL_340","A4"."Z_COL_341_340" "Z_COL_341","A4"."Z_COL_342_341"               
"Z_COL_342","A4"."Z_COL_343_342" "Z_COL_343","A4"."Z_COL_344_343"               
"Z_COL_344","A4"."Z_COL_345_344" "Z_COL_345","A4"."Z_COL_346_345"               
"Z_COL_346","A4"."Z_COL_347_346" "Z_COL_347","A4"."Z_COL_348_347"               
"Z_COL_348","A4"."Z_COL_349_348" "Z_COL_349","A4"."Z_COL_350_349"               
"Z_COL_350","A4"."Z_COL_351_350" "Z_COL_351","A4"."Z_COL_352_351"               
"Z_COL_352","A4"."Z_COL_353_352" "Z_COL_353","A4"."Z_COL_354_353"               
"Z_COL_354","A4"."Z_COL_355_354" "Z_COL_355","A4"."Z_COL_356_355"               
"Z_COL_356","A4"."Z_COL_357_356" "Z_COL_357","A4"."Z_COL_358_357"               
"Z_COL_358","A4"."Z_COL_359_358" "Z_COL_359","A4"."Z_COL_360_359"               
"Z_COL_360","A4"."Z_COL_361_360" "Z_COL_361","A4"."Z_COL_362_361"               
"Z_COL_362","A4"."Z_COL_363_362" "Z_COL_363","A4"."Z_COL_364_363"               
"Z_COL_364","A4"."Z_COL_365_364" "Z_COL_365","A4"."Z_COL_366_365"               
"Z_COL_366","A4"."Z_COL_367_366" "Z_COL_367","A4"."Z_COL_368_367"               
"Z_COL_368","A4"."Z_COL_369_368" "Z_COL_369","A4"."Z_COL_370_369"               
"Z_COL_370","A4"."Z_COL_371_370" "Z_COL_371","A4"."Z_COL_372_371"               
"Z_COL_372","A4"."Z_COL_373_372" "Z_COL_373","A4"."Z_COL_374_373"               
"Z_COL_374","A4"."Z_COL_375_374" "Z_COL_375","A4"."Z_COL_376_375"               
"Z_COL_376","A4"."Z_COL_377_376" "Z_COL_377","A4"."Z_COL_378_377"               
"Z_COL_378","A4"."Z_COL_379_378" "Z_COL_379","A4"."Z_COL_380_379"               
"Z_COL_380","A4"."Z_COL_381_380" "Z_COL_381","A4"."Z_COL_382_381"               
"Z_COL_382","A4"."Z_COL_383_382" "Z_COL_383","A4"."Z_COL_384_383"               
"Z_COL_384","A4"."Z_COL_385_384" "Z_COL_385","A4"."Z_COL_386_385"               
"Z_COL_386","A4"."Z_COL_387_386" "Z_COL_387","A4"."Z_COL_388_387"               
"Z_COL_388","A4"."Z_COL_389_388" "Z_COL_389","A4"."Z_COL_390_389"               
"Z_COL_390","A4"."Z_COL_391_390" "Z_COL_391","A4"."Z_COL_392_391"               
"Z_COL_392","A4"."Z_COL_393_392" "Z_COL_393","A4"."Z_COL_394_393"               
"Z_COL_394","A4"."Z_COL_395_394" "Z_COL_395","A4"."Z_COL_396_395"               
"Z_COL_396","A4"."Z_COL_397_396" "Z_COL_397","A4"."Z_COL_398_397"               
"Z_COL_398","A4"."Z_COL_399_398" "Z_COL_399","A4"."Z_COL_400_399"               
"Z_COL_400","A4"."Z_COL_401_400" "Z_COL_401","A4"."Z_COL_402_401"               
"Z_COL_402","A4"."Z_COL_403_402" "Z_COL_403","A4"."Z_COL_404_403"               
"Z_COL_404","A4"."Z_COL_405_404" "Z_COL_405","A4"."Z_COL_406_405"               
"Z_COL_406","A4"."Z_COL_407_406" "Z_COL_407","A4"."Z_COL_408_407"               
"Z_COL_408","A4"."Z_COL_409_408" "Z_COL_409","A4"."Z_COL_410_409"               
"Z_COL_410","A4"."Z_COL_411_410" "Z_COL_411","A4"."Z_COL_412_411"               
"Z_COL_412","A4"."Z_COL_413_412" "Z_COL_413","A4"."Z_COL_414_413"               
"Z_COL_414","A4"."Z_COL_415_414" "Z_COL_415","A4"."Z_COL_416_415"               
"Z_COL_416","A4"."Z_COL_417_416" "Z_COL_417","A4"."Z_COL_418_417"               
"Z_COL_418","A4"."Z_COL_419_418" "Z_COL_419","A4"."Z_COL_420_419"               
"Z_COL_420","A4"."Z_COL_421_420" "Z_COL_421","A4"."Z_COL_422_421"               
"Z_COL_422","A4"."Z_COL_423_422" "Z_COL_423","A4"."Z_COL_424_423"               
"Z_COL_424","A4"."Z_COL_425_424" "Z_COL_425","A4"."Z_COL_426_425"               
"Z_COL_426","A4"."Z_COL_427_426" "Z_COL_427","A4"."Z_COL_428_427"               
"Z_COL_428","A4"."Z_COL_429_428" "Z_COL_429","A4"."Z_COL_430_429"               
"Z_COL_430","A4"."Z_COL_431_430" "Z_COL_431","A4"."Z_COL_432_431"               
"Z_COL_432","A4"."Z_COL_433_432" "Z_COL_433","A4"."Z_COL_434_433"               
"Z_COL_434","A4"."Z_COL_435_434" "Z_COL_435","A4"."Z_COL_436_435"               
"Z_COL_436","A4"."Z_COL_437_436" "Z_COL_437","A4"."Z_COL_438_437"               
"Z_COL_438","A4"."Z_COL_439_438" "Z_COL_439","A4"."Z_COL_440_439"               
"Z_COL_440","A4"."Z_COL_441_440" "Z_COL_441","A4"."Z_COL_442_441"               
"Z_COL_442","A4"."Z_COL_443_442" "Z_COL_443","A4"."Z_COL_444_443"               
"Z_COL_444","A4"."Z_COL_445_444" "Z_COL_445","A4"."Z_COL_446_445"               
"Z_COL_446","A4"."Z_COL_447_446" "Z_COL_447","A4"."Z_COL_448_447"               
"Z_COL_448","A4"."Z_COL_449_448" "Z_COL_449","A4"."Z_COL_450_449"               
"Z_COL_450","A4"."Z_COL_451_450" "Z_COL_451","A4"."Z_COL_452_451"               
"Z_COL_452","A4"."Z_COL_453_452" "Z_COL_453","A4"."Z_COL_454_453"               
"Z_COL_454","A4"."Z_COL_455_454" "Z_COL_455","A4"."Z_COL_456_455"               
"Z_COL_456","A4"."Z_COL_457_456" "Z_COL_457","A4"."Z_COL_458_457"               
"Z_COL_458","A4"."Z_COL_459_458" "Z_COL_459","A4"."Z_COL_460_459"               
"Z_COL_460","A4"."Z_COL_461_460" "Z_COL_461","A4"."Z_COL_462_461"               
"Z_COL_462","A4"."Z_COL_463_462" "Z_COL_463","A4"."Z_COL_464_463"               
"Z_COL_464","A4"."Z_COL_465_464" "Z_COL_465","A4"."Z_COL_466_465"               
"Z_COL_466","A4"."Z_COL_467_466" "Z_COL_467","A4"."Z_COL_468_467"               
"Z_COL_468","A4"."Z_COL_469_468" "Z_COL_469","A4"."Z_COL_470_469"               
"Z_COL_470","A4"."Z_COL_471_470" "Z_COL_471","A4"."Z_COL_472_471"               
"Z_COL_472","A4"."Z_COL_473_472" "Z_COL_473","A4"."Z_COL_474_473"               
"Z_COL_474","A4"."Z_COL_475_474" "Z_COL_475","A4"."Z_COL_476_475"               
"Z_COL_476","A4"."Z_COL_477_476" "Z_COL_477","A4"."Z_COL_478_477"               
"Z_COL_478","A4"."Z_COL_479_478" "Z_COL_479","A4"."Z_COL_480_479"               
"Z_COL_480","A4"."Z_COL_481_480" "Z_COL_481","A4"."Z_COL_482_481"               
"Z_COL_482","A4"."Z_COL_483_482" "Z_COL_483","A4"."Z_COL_484_483"               
"Z_COL_484","A4"."Z_COL_485_484" "Z_COL_485","A4"."Z_COL_486_485"               
"Z_COL_486","A4"."Z_COL_487_486" "Z_COL_487","A4"."Z_COL_488_487"               
"Z_COL_488","A4"."Z_COL_489_488" "Z_COL_489","A4"."Z_COL_490_489"               
"Z_COL_490","A4"."Z_COL_491_490" "Z_COL_491","A4"."Z_COL_492_491"               
"Z_COL_492","A4"."Z_COL_493_492" "Z_COL_493","A4"."Z_COL_494_493"               
"Z_COL_494","A4"."Z_COL_495_494" "Z_COL_495","A4"."Z_COL_496_495"               
"Z_COL_496","A4"."Z_COL_497_496" "Z_COL_497","A4"."Z_COL_498_497"               
"Z_COL_498","A4"."Z_COL_499_498" "Z_COL_499","A4"."Z_COL_001_499"               
"Z_COL_001","A4"."T_COL__002_500" "T_COL__002","A4"."T_COL__003_501"            
"T_COL__003","A4"."T_COL__004_502" "T_COL__004","A4"."T_COL__005_503"           
"T_COL__005","A4"."T_COL__006_504" "T_COL__006","A4"."T_COL__007_505"           
"T_COL__007","A4"."T_COL__008_506" "T_COL__008","A4"."T_COL__009_507"           
"T_COL__009","A4"."T_COL__010_508" "T_COL__010","A4"."T_COL__011_509"           
"T_COL__011","A4"."T_COL__012_510" "T_COL__012","A4"."T_COL__013_511"           
"T_COL__013","A4"."T_COL__014_512" "T_COL__014","A4"."T_COL__015_513"           
"T_COL__015","A4"."T_COL__016_514" "T_COL__016","A4"."T_COL__017_515"           
"T_COL__017","A4"."T_COL__018_516" "T_COL__018","A4"."T_COL__019_517"           
"T_COL__019","A4"."T_COL__020_518" "T_COL__020","A4"."T_COL__021_519"           
"T_COL__021","A4"."T_COL__022_520" "T_COL__022","A4"."T_COL__023_521"           
"T_COL__023","A4"."T_COL__024_522" "T_COL__024","A4"."T_COL__025_523"           
"T_COL__025","A4"."T_COL__026_524" "T_COL__026","A4"."T_COL__027_525"           
"T_COL__027","A4"."T_COL__028_526" "T_COL__028","A4"."T_COL__029_527"           
"T_COL__029","A4"."T_COL__030_528" "T_COL__030","A4"."T_COL__031_529"           
"T_COL__031","A4"."T_COL__032_530" "T_COL__032","A4"."T_COL__033_531"           
"T_COL__033","A4"."T_COL__034_532" "T_COL__034","A4"."T_COL__035_533"           
"T_COL__035","A4"."T_COL__036_534" "T_COL__036","A4"."T_COL__037_535"           
"T_COL__037","A4"."T_COL__038_536" "T_COL__038","A4"."T_COL__039_537"           
"T_COL__039","A4"."T_COL__040_538" "T_COL__040","A4"."T_COL__041_539"           
"T_COL__041","A4"."T_COL__042_540" "T_COL__042","A4"."T_COL__043_541"           
"T_COL__043","A4"."T_COL__044_542" "T_COL__044","A4"."T_COL__045_543"           
"T_COL__045","A4"."T_COL__046_544" "T_COL__046","A4"."T_COL__047_545"           
"T_COL__047","A4"."T_COL__048_546" "T_COL__048","A4"."T_COL__049_547"           
"T_COL__049","A4"."T_COL__050_548" "T_COL__050","A4"."T_COL__051_549"           
"T_COL__051","A4"."T_COL__052_550" "T_COL__052","A4"."T_COL__053_551"           
"T_COL__053","A4"."T_COL__054_552" "T_COL__054","A4"."T_COL__055_553"           
"T_COL__055","A4"."T_COL__056_554" "T_COL__056","A4"."T_COL__057_555"           
"T_COL__057","A4"."T_COL__058_556" "T_COL__058","A4"."T_COL__059_557"           
"T_COL__059","A4"."T_COL__060_558" "T_COL__060","A4"."T_COL__061_559"           
"T_COL__061","A4"."T_COL__062_560" "T_COL__062","A4"."T_COL__063_561"           
"T_COL__063","A4"."T_COL__064_562" "T_COL__064","A4"."T_COL__065_563"           
"T_COL__065","A4"."T_COL__066_564" "T_COL__066","A4"."T_COL__067_565"           
"T_COL__067","A4"."T_COL__068_566" "T_COL__068","A4"."T_COL__069_567"           
"T_COL__069","A4"."T_COL__070_568" "T_COL__070","A4"."T_COL__071_569"           
"T_COL__071","A4"."T_COL__072_570" "T_COL__072","A4"."T_COL__073_571"           
"T_COL__073","A4"."T_COL__074_572" "T_COL__074","A4"."T_COL__075_573"           
"T_COL__075","A4"."T_COL__076_574" "T_COL__076","A4"."T_COL__077_575"           
"T_COL__077","A4"."T_COL__078_576" "T_COL__078","A4"."T_COL__079_577"           
"T_COL__079","A4"."T_COL__080_578" "T_COL__080","A4"."T_COL__081_579"           
"T_COL__081","A4"."T_COL__082_580" "T_COL__082","A4"."T_COL__083_581"           
"T_COL__083","A4"."T_COL__084_582" "T_COL__084","A4"."T_COL__085_583"           
"T_COL__085","A4"."T_COL__086_584" "T_COL__086","A4"."T_COL__087_585"           
"T_COL__087","A4"."T_COL__088_586" "T_COL__088","A4"."T_COL__089_587"           
"T_COL__089","A4"."T_COL__090_588" "T_COL__090","A4"."T_COL__091_589"           
"T_COL__091","A4"."T_COL__092_590" "T_COL__092","A4"."T_COL__093_591"           
"T_COL__093","A4"."T_COL__094_592" "T_COL__094","A4"."T_COL__095_593"           
"T_COL__095","A4"."T_COL__096_594" "T_COL__096","A4"."T_COL__097_595"           
"T_COL__097","A4"."T_COL__098_596" "T_COL__098","A4"."T_COL__099_597"           
"T_COL__099","A4"."T_COL__100_598" "T_COL__100","A4"."T_COL__101_599"           
"T_COL__101","A4"."T_COL__102_600" "T_CO                                        
                                                                                

The same column list is produced by the ANSI expansion. If, however, a single column is selected from the ANSI join no such ‘unlimited’ expansion occurs:


SQL> 
SQL> --
SQL> -- Selecting only one column from the ANSI join doesn't produce the exaggerated
SQL> -- column list
SQL> --
SQL> 
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2      m_sql_in    clob :=
  3                          '
  4                          select p.P_COLUMN_002
  5                          from ORANGE g
  6                          join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7                          join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8                          ';
  9  begin
 10  
 11      dbms_utility.expand_sql_text(
 12          m_sql_in,
 13          :m_sql_out
 14      );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT "A1"."P_COLUMN_002_3" "P_COLUMN_002" FROM  (SELECT "A3"."Z_COL_001_0"    
"Z_COL_001","A3"."Z_COL_001_1" "Z_COL_001","A2"."Z_COL_001"                     
"Z_COL_001","A2"."P_COLUMN_002" "P_COLUMN_002_3" FROM  (SELECT "A5"."Z_COL_001" 
"Z_COL_001_0","A4"."Z_COL_001" "Z_COL_001_1" FROM "BING"."ORANGE"               
"A5","BING"."MAUVE" "A4" WHERE "A5"."Z_COL_001"="A4"."Z_COL_001")               
"A3","BING"."YELLOW" "A2" WHERE "A3"."Z_COL_001_0"="A2"."Z_COL_001") "A1"       
                                                                                

SQL> 
SQL> drop table ORANGE;

Table dropped.

SQL> drop table MAUVE;

Table dropped.

SQL> drop table YELLOW;

Table dropped.

SQL> 

Using ‘old style’ Oracle join syntax also produces the correct column list on expansion:


SQL> declare
  2      m_sql_in    clob :=
  3                          '
  4                          select p.*
  5                          from ORANGE g,
  6                               MAUVE r,
  7                               YELLOW p
  8                          where g.Z_COL_001 = p.Z_COL_001
  9                          and g.Z_COL_001 = r.Z_COL_001
 10                          ';
 11  begin
 12
 13      dbms_utility.expand_sql_text(
 14          m_sql_in,
 15          :m_sql_out
 16      );
 17
 18  end;
 19  /

PL/SQL procedure successfully completed.

SQL>
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT "A1"."Z_COL_001" "Z_COL_001","A1"."P_COLUMN_002" "P_COLUMN_002" FROM
"SYS"."ORANGE" "A3","SYS"."MAUVE" "A2","SYS"."YELLOW" "A1" WHERE
"A3"."Z_COL_001"="A1"."Z_COL_001" AND "A3"."Z_COL_001"="A2"."Z_COL_001"


SQL>

So this appears to be a bug in the ANSI implementation in 12c; earlier releases don’t exhibit this behavior. Even though this isn’t likely to be a common problem in OLTP systems (it’s probably pretty rare to have tables with 500 or more columns, and probably even rarer to have them joined together) in a data warehouse environment this may be fairly common. Oracle support reports this as a workaround:


alter session set "_fix_control"='17376322:OFF';

If the same example is run after the above statement is executed the error does go away:


SQL> 
SQL> alter session set "_fix_control"='17376322:OFF';

Session altered.

SQL> 
SQL> --
SQL> -- Create 500 column tables
SQL> --
SQL> declare v_sql varchar2(32767);
  2  
  3  begin
  4  
  5    -- create test table ORANGE with 50 columns
  6    v_sql := 'create table ORANGE (Z_COL_001 number(9) not null';
  7    for i in 1 .. 499 loop
  8  	 v_sql := v_sql || ',' || chr(10) || 'Z_COL_' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
  9    end loop;
 10    v_sql := v_sql || ')';
 11    execute immediate v_sql;
 12  
 13    -- create test table MAUVE with 50 columns
 14  
 15    v_sql := 'create table MAUVE (Z_COL_001 number(9) not null';
 16    for i in 1 .. 499 loop
 17  	 v_sql := v_sql || ',' || chr(10) || 'T_COL__' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
 18    end loop;
 19    v_sql := v_sql || ')';
 20    execute immediate v_sql;
 21  
 22  end;
 23  /

PL/SQL procedure successfully completed.

SQL> 
SQL> -- create test table YELLOW with 2 columns
SQL> 
SQL> create table YELLOW (Z_COL_001 number(9) not null, P_COLUMN_002 varchar2(2));

Table created.

SQL> 
SQL> --********************************************************************************--
SQL> -- selecting one column work!
SQL> --********************************************************************************--
SQL> 
SQL> select p.P_COLUMN_002
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- notice the YELLOW table only has 2 columns, but selecting p.* fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select p.*
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- sub selecting only one column also fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select (select 1 from dual where 1 = 2) as exp_column
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> drop table ORANGE;

Table dropped.

SQL> 
SQL> drop table MAUVE;

Table dropped.

SQL> 
SQL> drop table YELLOW;

Table dropped.

SQL> 
SQL> --
SQL> -- Create 499 column tables so we can see the expansion problem
SQL> --
SQL> declare v_sql varchar2(32767);
  2  
  3  begin
  4  
  5    -- create test table ORANGE with 50 columns
  6    v_sql := 'create table ORANGE (Z_COL_001 number(9) not null';
  7    for i in 1 .. 498 loop
  8  	 v_sql := v_sql || ',' || chr(10) || 'Z_COL_' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
  9    end loop;
 10    v_sql := v_sql || ')';
 11    execute immediate v_sql;
 12  
 13    -- create test table MAUVE with 50 columns
 14  
 15    v_sql := 'create table MAUVE (Z_COL_001 number(9) not null';
 16    for i in 1 .. 498 loop
 17  	 v_sql := v_sql || ',' || chr(10) || 'T_COL__' || lpad(to_char(i+1), 3, '0') || ' varchar2(2) null';
 18    end loop;
 19    v_sql := v_sql || ')';
 20    execute immediate v_sql;
 21  
 22  end;
 23  /

PL/SQL procedure successfully completed.

SQL> 
SQL> -- create test table YELLOW with 2 columns
SQL> 
SQL> create table YELLOW (Z_COL_001 number(9) not null, P_COLUMN_002 varchar2(2));

Table created.

SQL> 
SQL> --********************************************************************************--
SQL> -- selecting one column work!
SQL> --********************************************************************************--
SQL> 
SQL> select p.P_COLUMN_002
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- notice the YELLOW table only has 2 columns, but selecting p.* fails in Oracle 12c:
SQL> -- when the joined tables have more than 499 columns each
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select p.*
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- Here's why:
SQL> --
SQL> -- When Oracle attempts an ANSI expansion of the code columns multiply in the ANSI
SQL> -- join and somehow appear to be associated with the various tables included in
SQL> -- the join
SQL> --********************************************************************************--
SQL> 
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2  	 m_sql_in    clob :=
  3  			     '
  4  			     select p.*
  5  			     from ORANGE g
  6  			     join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7  			     join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8  			     ';
  9  begin
 10  
 11  	 dbms_utility.expand_sql_text(
 12  	     m_sql_in,
 13  	     :m_sql_out
 14  	 );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> set long 1000000
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT "A1"."Z_COL_001_998" "Z_COL_001","A1"."P_COLUMN_002_999" "P_COLUMN_002"  
FROM  (SELECT "A3"."Z_COL_001_0" "Z_COL_001","A3"."Z_COL_002_1"                 
"Z_COL_002","A3"."Z_COL_003_2" "Z_COL_003","A3"."Z_COL_004_3"                   
"Z_COL_004","A3"."Z_COL_005_4" "Z_COL_005","A3"."Z_COL_006_5"                   
"Z_COL_006","A3"."Z_COL_007_6" "Z_COL_007","A3"."Z_COL_008_7"                   
"Z_COL_008","A3"."Z_COL_009_8" "Z_COL_009","A3"."Z_COL_010_9"                   
"Z_COL_010","A3"."Z_COL_011_10" "Z_COL_011","A3"."Z_COL_012_11"                 
"Z_COL_012","A3"."Z_COL_013_12" "Z_COL_013","A3"."Z_COL_014_13"                 
"Z_COL_014","A3"."Z_COL_015_14" "Z_COL_015","A3"."Z_COL_016_15"                 
"Z_COL_016","A3"."Z_COL_017_16" "Z_COL_017","A3"."Z_COL_018_17"                 
"Z_COL_018","A3"."Z_COL_019_18" "Z_COL_019","A3"."Z_COL_020_19"                 
"Z_COL_020","A3"."Z_COL_021_20" "Z_COL_021","A3"."Z_COL_022_21"                 
"Z_COL_022","A3"."Z_COL_023_22" "Z_COL_023","A3"."Z_COL_024_23"                 
"Z_COL_024","A3"."Z_COL_025_24" "Z_COL_025","A3"."Z_COL_026_25"                 
"Z_COL_026","A3"."Z_COL_027_26" "Z_COL_027","A3"."Z_COL_028_27"                 
"Z_COL_028","A3"."Z_COL_029_28" "Z_COL_029","A3"."Z_COL_030_29"                 
"Z_COL_030","A3"."Z_COL_031_30" "Z_COL_031","A3"."Z_COL_032_31"                 
"Z_COL_032","A3"."Z_COL_033_32" "Z_COL_033","A3"."Z_COL_034_33"                 
"Z_COL_034","A3"."Z_COL_035_34" "Z_COL_035","A3"."Z_COL_036_35"                 
"Z_COL_036","A3"."Z_COL_037_36" "Z_COL_037","A3"."Z_COL_038_37"                 
"Z_COL_038","A3"."Z_COL_039_38" "Z_COL_039","A3"."Z_COL_040_39"                 
"Z_COL_040","A3"."Z_COL_041_40" "Z_COL_041","A3"."Z_COL_042_41"                 
"Z_COL_042","A3"."Z_COL_043_42" "Z_COL_043","A3"."Z_COL_044_43"                 
"Z_COL_044","A3"."Z_COL_045_44" "Z_COL_045","A3"."Z_COL_046_45"                 
"Z_COL_046","A3"."Z_COL_047_46" "Z_COL_047","A3"."Z_COL_048_47"                 
"Z_COL_048","A3"."Z_COL_049_48" "Z_COL_049","A3"."Z_COL_050_49"                 
"Z_COL_050","A3"."Z_COL_051_50" "Z_COL_051","A3"."Z_COL_052_51"                 
"Z_COL_052","A3"."Z_COL_053_52" "Z_COL_053","A3"."Z_COL_054_53"                 
"Z_COL_054","A3"."Z_COL_055_54" "Z_COL_055","A3"."Z_COL_056_55"                 
"Z_COL_056","A3"."Z_COL_057_56" "Z_COL_057","A3"."Z_COL_058_57"                 
"Z_COL_058","A3"."Z_COL_059_58" "Z_COL_059","A3"."Z_COL_060_59"                 
"Z_COL_060","A3"."Z_COL_061_60" "Z_COL_061","A3"."Z_COL_062_61"                 
"Z_COL_062","A3"."Z_COL_063_62" "Z_COL_063","A3"."Z_COL_064_63"                 
"Z_COL_064","A3"."Z_COL_065_64" "Z_COL_065","A3"."Z_COL_066_65"                 
"Z_COL_066","A3"."Z_COL_067_66" "Z_COL_067","A3"."Z_COL_068_67"                 
"Z_COL_068","A3"."Z_COL_069_68" "Z_COL_069","A3"."Z_COL_070_69"                 
"Z_COL_070","A3"."Z_COL_071_70" "Z_COL_071","A3"."Z_COL_072_71"                 
"Z_COL_072","A3"."Z_COL_073_72" "Z_COL_073","A3"."Z_COL_074_73"                 
"Z_COL_074","A3"."Z_COL_075_74" "Z_COL_075","A3"."Z_COL_076_75"                 
"Z_COL_076","A3"."Z_COL_077_76" "Z_COL_077","A3"."Z_COL_078_77"                 
"Z_COL_078","A3"."Z_COL_079_78" "Z_COL_079","A3"."Z_COL_080_79"                 
"Z_COL_080","A3"."Z_COL_081_80" "Z_COL_081","A3"."Z_COL_082_81"                 
"Z_COL_082","A3"."Z_COL_083_82" "Z_COL_083","A3"."Z_COL_084_83"                 
"Z_COL_084","A3"."Z_COL_085_84" "Z_COL_085","A3"."Z_COL_086_85"                 
"Z_COL_086","A3"."Z_COL_087_86" "Z_COL_087","A3"."Z_COL_088_87"                 
"Z_COL_088","A3"."Z_COL_089_88" "Z_COL_089","A3"."Z_COL_090_89"                 
"Z_COL_090","A3"."Z_COL_091_90" "Z_COL_091","A3"."Z_COL_092_91"                 
"Z_COL_092","A3"."Z_COL_093_92" "Z_COL_093","A3"."Z_COL_094_93"                 
"Z_COL_094","A3"."Z_COL_095_94" "Z_COL_095","A3"."Z_COL_096_95"                 
"Z_COL_096","A3"."Z_COL_097_96" "Z_COL_097","A3"."Z_COL_098_97"                 
"Z_COL_098","A3"."Z_COL_099_98" "Z_COL_099","A3"."Z_COL_100_99"                 
"Z_COL_100","A3"."Z_COL_101_100" "Z_COL_101","A3"."Z_COL_102_101"               
"Z_COL_102","A3"."Z_COL_103_102" "Z_COL_103","A3"."Z_COL_104_103"               
"Z_COL_104","A3"."Z_COL_105_104" "Z_COL_105","A3"."Z_COL_106_105"               
"Z_COL_106","A3"."Z_COL_107_106" "Z_COL_107","A3"."Z_COL_108_107"               
"Z_COL_108","A3"."Z_COL_109_108" "Z_COL_109","A3"."Z_COL_110_109"               
"Z_COL_110","A3"."Z_COL_111_110" "Z_COL_111","A3"."Z_COL_112_111"               
"Z_COL_112","A3"."Z_COL_113_112" "Z_COL_113","A3"."Z_COL_114_113"               
"Z_COL_114","A3"."Z_COL_115_114" "Z_COL_115","A3"."Z_COL_116_115"               
"Z_COL_116","A3"."Z_COL_117_116" "Z_COL_117","A3"."Z_COL_118_117"               
"Z_COL_118","A3"."Z_COL_119_118" "Z_COL_119","A3"."Z_COL_120_119"               
"Z_COL_120","A3"."Z_COL_121_120" "Z_COL_121","A3"."Z_COL_122_121"               
"Z_COL_122","A3"."Z_COL_123_122" "Z_COL_123","A3"."Z_COL_124_123"               
"Z_COL_124","A3"."Z_COL_125_124" "Z_COL_125","A3"."Z_COL_126_125"               
"Z_COL_126","A3"."Z_COL_127_126" "Z_COL_127","A3"."Z_COL_128_127"               
"Z_COL_128","A3"."Z_COL_129_128" "Z_COL_129","A3"."Z_COL_130_129"               
"Z_COL_130","A3"."Z_COL_131_130" "Z_COL_131","A3"."Z_COL_132_131"               
"Z_COL_132","A3"."Z_COL_133_132" "Z_COL_133","A3"."Z_COL_134_133"               
"Z_COL_134","A3"."Z_COL_135_134" "Z_COL_135","A3"."Z_COL_136_135"               
"Z_COL_136","A3"."Z_COL_137_136" "Z_COL_137","A3"."Z_COL_138_137"               
"Z_COL_138","A3"."Z_COL_139_138" "Z_COL_139","A3"."Z_COL_140_139"               
"Z_COL_140","A3"."Z_COL_141_140" "Z_COL_141","A3"."Z_COL_142_141"               
"Z_COL_142","A3"."Z_COL_143_142" "Z_COL_143","A3"."Z_COL_144_143"               
"Z_COL_144","A3"."Z_COL_145_144" "Z_COL_145","A3"."Z_COL_146_145"               
"Z_COL_146","A3"."Z_COL_147_146" "Z_COL_147","A3"."Z_COL_148_147"               
"Z_COL_148","A3"."Z_COL_149_148" "Z_COL_149","A3"."Z_COL_150_149"               
"Z_COL_150","A3"."Z_COL_151_150" "Z_COL_151","A3"."Z_COL_152_151"               
"Z_COL_152","A3"."Z_COL_153_152" "Z_COL_153","A3"."Z_COL_154_153"               
"Z_COL_154","A3"."Z_COL_155_154" "Z_COL_155","A3"."Z_COL_156_155"               
"Z_COL_156","A3"."Z_COL_157_156" "Z_COL_157","A3"."Z_COL_158_157"               
"Z_COL_158","A3"."Z_COL_159_158" "Z_COL_159","A3"."Z_COL_160_159"               
"Z_COL_160","A3"."Z_COL_161_160" "Z_COL_161","A3"."Z_COL_162_161"               
"Z_COL_162","A3"."Z_COL_163_162" "Z_COL_163","A3"."Z_COL_164_163"               
"Z_COL_164","A3"."Z_COL_165_164" "Z_COL_165","A3"."Z_COL_166_165"               
"Z_COL_166","A3"."Z_COL_167_166" "Z_COL_167","A3"."Z_COL_168_167"               
"Z_COL_168","A3"."Z_COL_169_168" "Z_COL_169","A3"."Z_COL_170_169"               
"Z_COL_170","A3"."Z_COL_171_170" "Z_COL_171","A3"."Z_COL_172_171"               
"Z_COL_172","A3"."Z_COL_173_172" "Z_COL_173","A3"."Z_COL_174_173"               
"Z_COL_174","A3"."Z_COL_175_174" "Z_COL_175","A3"."Z_COL_176_175"               
"Z_COL_176","A3"."Z_COL_177_176" "Z_COL_177","A3"."Z_COL_178_177"               
"Z_COL_178","A3"."Z_COL_179_178" "Z_COL_179","A3"."Z_COL_180_179"               
"Z_COL_180","A3"."Z_COL_181_180" "Z_COL_181","A3"."Z_COL_182_181"               
"Z_COL_182","A3"."Z_COL_183_182" "Z_COL_183","A3"."Z_COL_184_183"               
"Z_COL_184","A3"."Z_COL_185_184" "Z_COL_185","A3"."Z_COL_186_185"               
"Z_COL_186","A3"."Z_COL_187_186" "Z_COL_187","A3"."Z_COL_188_187"               
"Z_COL_188","A3"."Z_COL_189_188" "Z_COL_189","A3"."Z_COL_190_189"               
"Z_COL_190","A3"."Z_COL_191_190" "Z_COL_191","A3"."Z_COL_192_191"               
"Z_COL_192","A3"."Z_COL_193_192" "Z_COL_193","A3"."Z_COL_194_193"               
"Z_COL_194","A3"."Z_COL_195_194" "Z_COL_195","A3"."Z_COL_196_195"               
"Z_COL_196","A3"."Z_COL_197_196" "Z_COL_197","A3"."Z_COL_198_197"               
"Z_COL_198","A3"."Z_COL_199_198" "Z_COL_199","A3"."Z_COL_200_199"               
"Z_COL_200","A3"."Z_COL_201_200" "Z_COL_201","A3"."Z_COL_202_201"               
"Z_COL_202","A3"."Z_COL_203_202" "Z_COL_203","A3"."Z_COL_204_203"               
"Z_COL_204","A3"."Z_COL_205_204" "Z_COL_205","A3"."Z_COL_206_205"               
"Z_COL_206","A3"."Z_COL_207_206" "Z_COL_207","A3"."Z_COL_208_207"               
"Z_COL_208","A3"."Z_COL_209_208" "Z_COL_209","A3"."Z_COL_210_209"               
"Z_COL_210","A3"."Z_COL_211_210" "Z_COL_211","A3"."Z_COL_212_211"               
"Z_COL_212","A3"."Z_COL_213_212" "Z_COL_213","A3"."Z_COL_214_213"               
"Z_COL_214","A3"."Z_COL_215_214" "Z_COL_215","A3"."Z_COL_216_215"               
"Z_COL_216","A3"."Z_COL_217_216" "Z_COL_217","A3"."Z_COL_218_217"               
"Z_COL_218","A3"."Z_COL_219_218" "Z_COL_219","A3"."Z_COL_220_219"               
"Z_COL_220","A3"."Z_COL_221_220" "Z_COL_221","A3"."Z_COL_222_221"               
"Z_COL_222","A3"."Z_COL_223_222" "Z_COL_223","A3"."Z_COL_224_223"               
"Z_COL_224","A3"."Z_COL_225_224" "Z_COL_225","A3"."Z_COL_226_225"               
"Z_COL_226","A3"."Z_COL_227_226" "Z_COL_227","A3"."Z_COL_228_227"               
"Z_COL_228","A3"."Z_COL_229_228" "Z_COL_229","A3"."Z_COL_230_229"               
"Z_COL_230","A3"."Z_COL_231_230" "Z_COL_231","A3"."Z_COL_232_231"               
"Z_COL_232","A3"."Z_COL_233_232" "Z_COL_233","A3"."Z_COL_234_233"               
"Z_COL_234","A3"."Z_COL_235_234" "Z_COL_235","A3"."Z_COL_236_235"               
"Z_COL_236","A3"."Z_COL_237_236" "Z_COL_237","A3"."Z_COL_238_237"               
"Z_COL_238","A3"."Z_COL_239_238" "Z_COL_239","A3"."Z_COL_240_239"               
"Z_COL_240","A3"."Z_COL_241_240" "Z_COL_241","A3"."Z_COL_242_241"               
"Z_COL_242","A3"."Z_COL_243_242" "Z_COL_243","A3"."Z_COL_244_243"               
"Z_COL_244","A3"."Z_COL_245_244" "Z_COL_245","A3"."Z_COL_246_245"               
"Z_COL_246","A3"."Z_COL_247_246" "Z_COL_247","A3"."Z_COL_248_247"               
"Z_COL_248","A3"."Z_COL_249_248" "Z_COL_249","A3"."Z_COL_250_249"               
"Z_COL_250","A3"."Z_COL_251_250" "Z_COL_251","A3"."Z_COL_252_251"               
"Z_COL_252","A3"."Z_COL_253_252" "Z_COL_253","A3"."Z_COL_254_253"               
"Z_COL_254","A3"."Z_COL_255_254" "Z_COL_255","A3"."Z_COL_256_255"               
"Z_COL_256","A3"."Z_COL_257_256" "Z_COL_257","A3"."Z_COL_258_257"               
"Z_COL_258","A3"."Z_COL_259_258" "Z_COL_259","A3"."Z_COL_260_259"               
"Z_COL_260","A3"."Z_COL_261_260" "Z_COL_261","A3"."Z_COL_262_261"               
"Z_COL_262","A3"."Z_COL_263_262" "Z_COL_263","A3"."Z_COL_264_263"               
"Z_COL_264","A3"."Z_COL_265_264" "Z_COL_265","A3"."Z_COL_266_265"               
"Z_COL_266","A3"."Z_COL_267_266" "Z_COL_267","A3"."Z_COL_268_267"               
"Z_COL_268","A3"."Z_COL_269_268" "Z_COL_269","A3"."Z_COL_270_269"               
"Z_COL_270","A3"."Z_COL_271_270" "Z_COL_271","A3"."Z_COL_272_271"               
"Z_COL_272","A3"."Z_COL_273_272" "Z_COL_273","A3"."Z_COL_274_273"               
"Z_COL_274","A3"."Z_COL_275_274" "Z_COL_275","A3"."Z_COL_276_275"               
"Z_COL_276","A3"."Z_COL_277_276" "Z_COL_277","A3"."Z_COL_278_277"               
"Z_COL_278","A3"."Z_COL_279_278" "Z_COL_279","A3"."Z_COL_280_279"               
"Z_COL_280","A3"."Z_COL_281_280" "Z_COL_281","A3"."Z_COL_282_281"               
"Z_COL_282","A3"."Z_COL_283_282" "Z_COL_283","A3"."Z_COL_284_283"               
"Z_COL_284","A3"."Z_COL_285_284" "Z_COL_285","A3"."Z_COL_286_285"               
"Z_COL_286","A3"."Z_COL_287_286" "Z_COL_287","A3"."Z_COL_288_287"               
"Z_COL_288","A3"."Z_COL_289_288" "Z_COL_289","A3"."Z_COL_290_289"               
"Z_COL_290","A3"."Z_COL_291_290" "Z_COL_291","A3"."Z_COL_292_291"               
"Z_COL_292","A3"."Z_COL_293_292" "Z_COL_293","A3"."Z_COL_294_293"               
"Z_COL_294","A3"."Z_COL_295_294" "Z_COL_295","A3"."Z_COL_296_295"               
"Z_COL_296","A3"."Z_COL_297_296" "Z_COL_297","A3"."Z_COL_298_297"               
"Z_COL_298","A3"."Z_COL_299_298" "Z_COL_299","A3"."Z_COL_300_299"               
"Z_COL_300","A3"."Z_COL_301_300" "Z_COL_301","A3"."Z_COL_302_301"               
"Z_COL_302","A3"."Z_COL_303_302" "Z_COL_303","A3"."Z_COL_304_303"               
"Z_COL_304","A3"."Z_COL_305_304" "Z_COL_305","A3"."Z_COL_306_305"               
"Z_COL_306","A3"."Z_COL_307_306" "Z_COL_307","A3"."Z_COL_308_307"               
"Z_COL_308","A3"."Z_COL_309_308" "Z_COL_309","A3"."Z_COL_310_309"               
"Z_COL_310","A3"."Z_COL_311_310" "Z_COL_311","A3"."Z_COL_312_311"               
"Z_COL_312","A3"."Z_COL_313_312" "Z_COL_313","A3"."Z_COL_314_313"               
"Z_COL_314","A3"."Z_COL_315_314" "Z_COL_315","A3"."Z_COL_316_315"               
"Z_COL_316","A3"."Z_COL_317_316" "Z_COL_317","A3"."Z_COL_318_317"               
"Z_COL_318","A3"."Z_COL_319_318" "Z_COL_319","A3"."Z_COL_320_319"               
"Z_COL_320","A3"."Z_COL_321_320" "Z_COL_321","A3"."Z_COL_322_321"               
"Z_COL_322","A3"."Z_COL_323_322" "Z_COL_323","A3"."Z_COL_324_323"               
"Z_COL_324","A3"."Z_COL_325_324" "Z_COL_325","A3"."Z_COL_326_325"               
"Z_COL_326","A3"."Z_COL_327_326" "Z_COL_327","A3"."Z_COL_328_327"               
"Z_COL_328","A3"."Z_COL_329_328" "Z_COL_329","A3"."Z_COL_330_329"               
"Z_COL_330","A3"."Z_COL_331_330" "Z_COL_331","A3"."Z_COL_332_331"               
"Z_COL_332","A3"."Z_COL_333_332" "Z_COL_333","A3"."Z_COL_334_333"               
"Z_COL_334","A3"."Z_COL_335_334" "Z_COL_335","A3"."Z_COL_336_335"               
"Z_COL_336","A3"."Z_COL_337_336" "Z_COL_337","A3"."Z_COL_338_337"               
"Z_COL_338","A3"."Z_COL_339_338" "Z_COL_339","A3"."Z_COL_340_339"               
"Z_COL_340","A3"."Z_COL_341_340" "Z_COL_341","A3"."Z_COL_342_341"               
"Z_COL_342","A3"."Z_COL_343_342" "Z_COL_343","A3"."Z_COL_344_343"               
"Z_COL_344","A3"."Z_COL_345_344" "Z_COL_345","A3"."Z_COL_346_345"               
"Z_COL_346","A3"."Z_COL_347_346" "Z_COL_347","A3"."Z_COL_348_347"               
"Z_COL_348","A3"."Z_COL_349_348" "Z_COL_349","A3"."Z_COL_350_349"               
"Z_COL_350","A3"."Z_COL_351_350" "Z_COL_351","A3"."Z_COL_352_351"               
"Z_COL_352","A3"."Z_COL_353_352" "Z_COL_353","A3"."Z_COL_354_353"               
"Z_COL_354","A3"."Z_COL_355_354" "Z_COL_355","A3"."Z_COL_356_355"               
"Z_COL_356","A3"."Z_COL_357_356" "Z_COL_357","A3"."Z_COL_358_357"               
"Z_COL_358","A3"."Z_COL_359_358" "Z_COL_359","A3"."Z_COL_360_359"               
"Z_COL_360","A3"."Z_COL_361_360" "Z_COL_361","A3"."Z_COL_362_361"               
"Z_COL_362","A3"."Z_COL_363_362" "Z_COL_363","A3"."Z_COL_364_363"               
"Z_COL_364","A3"."Z_COL_365_364" "Z_COL_365","A3"."Z_COL_366_365"               
"Z_COL_366","A3"."Z_COL_367_366" "Z_COL_367","A3"."Z_COL_368_367"               
"Z_COL_368","A3"."Z_COL_369_368" "Z_COL_369","A3"."Z_COL_370_369"               
"Z_COL_370","A3"."Z_COL_371_370" "Z_COL_371","A3"."Z_COL_372_371"               
"Z_COL_372","A3"."Z_COL_373_372" "Z_COL_373","A3"."Z_COL_374_373"               
"Z_COL_374","A3"."Z_COL_375_374" "Z_COL_375","A3"."Z_COL_376_375"               
"Z_COL_376","A3"."Z_COL_377_376" "Z_COL_377","A3"."Z_COL_378_377"               
"Z_COL_378","A3"."Z_COL_379_378" "Z_COL_379","A3"."Z_COL_380_379"               
"Z_COL_380","A3"."Z_COL_381_380" "Z_COL_381","A3"."Z_COL_382_381"               
"Z_COL_382","A3"."Z_COL_383_382" "Z_COL_383","A3"."Z_COL_384_383"               
"Z_COL_384","A3"."Z_COL_385_384" "Z_COL_385","A3"."Z_COL_386_385"               
"Z_COL_386","A3"."Z_COL_387_386" "Z_COL_387","A3"."Z_COL_388_387"               
"Z_COL_388","A3"."Z_COL_389_388" "Z_COL_389","A3"."Z_COL_390_389"               
"Z_COL_390","A3"."Z_COL_391_390" "Z_COL_391","A3"."Z_COL_392_391"               
"Z_COL_392","A3"."Z_COL_393_392" "Z_COL_393","A3"."Z_COL_394_393"               
"Z_COL_394","A3"."Z_COL_395_394" "Z_COL_395","A3"."Z_COL_396_395"               
"Z_COL_396","A3"."Z_COL_397_396" "Z_COL_397","A3"."Z_COL_398_397"               
"Z_COL_398","A3"."Z_COL_399_398" "Z_COL_399","A3"."Z_COL_400_399"               
"Z_COL_400","A3"."Z_COL_401_400" "Z_COL_401","A3"."Z_COL_402_401"               
"Z_COL_402","A3"."Z_COL_403_402" "Z_COL_403","A3"."Z_COL_404_403"               
"Z_COL_404","A3"."Z_COL_405_404" "Z_COL_405","A3"."Z_COL_406_405"               
"Z_COL_406","A3"."Z_COL_407_406" "Z_COL_407","A3"."Z_COL_408_407"               
"Z_COL_408","A3"."Z_COL_409_408" "Z_COL_409","A3"."Z_COL_410_409"               
"Z_COL_410","A3"."Z_COL_411_410" "Z_COL_411","A3"."Z_COL_412_411"               
"Z_COL_412","A3"."Z_COL_413_412" "Z_COL_413","A3"."Z_COL_414_413"               
"Z_COL_414","A3"."Z_COL_415_414" "Z_COL_415","A3"."Z_COL_416_415"               
"Z_COL_416","A3"."Z_COL_417_416" "Z_COL_417","A3"."Z_COL_418_417"               
"Z_COL_418","A3"."Z_COL_419_418" "Z_COL_419","A3"."Z_COL_420_419"               
"Z_COL_420","A3"."Z_COL_421_420" "Z_COL_421","A3"."Z_COL_422_421"               
"Z_COL_422","A3"."Z_COL_423_422" "Z_COL_423","A3"."Z_COL_424_423"               
"Z_COL_424","A3"."Z_COL_425_424" "Z_COL_425","A3"."Z_COL_426_425"               
"Z_COL_426","A3"."Z_COL_427_426" "Z_COL_427","A3"."Z_COL_428_427"               
"Z_COL_428","A3"."Z_COL_429_428" "Z_COL_429","A3"."Z_COL_430_429"               
"Z_COL_430","A3"."Z_COL_431_430" "Z_COL_431","A3"."Z_COL_432_431"               
"Z_COL_432","A3"."Z_COL_433_432" "Z_COL_433","A3"."Z_COL_434_433"               
"Z_COL_434","A3"."Z_COL_435_434" "Z_COL_435","A3"."Z_COL_436_435"               
"Z_COL_436","A3"."Z_COL_437_436" "Z_COL_437","A3"."Z_COL_438_437"               
"Z_COL_438","A3"."Z_COL_439_438" "Z_COL_439","A3"."Z_COL_440_439"               
"Z_COL_440","A3"."Z_COL_441_440" "Z_COL_441","A3"."Z_COL_442_441"               
"Z_COL_442","A3"."Z_COL_443_442" "Z_COL_443","A3"."Z_COL_444_443"               
"Z_COL_444","A3"."Z_COL_445_444" "Z_COL_445","A3"."Z_COL_446_445"               
"Z_COL_446","A3"."Z_COL_447_446" "Z_COL_447","A3"."Z_COL_448_447"               
"Z_COL_448","A3"."Z_COL_449_448" "Z_COL_449","A3"."Z_COL_450_449"               
"Z_COL_450","A3"."Z_COL_451_450" "Z_COL_451","A3"."Z_COL_452_451"               
"Z_COL_452","A3"."Z_COL_453_452" "Z_COL_453","A3"."Z_COL_454_453"               
"Z_COL_454","A3"."Z_COL_455_454" "Z_COL_455","A3"."Z_COL_456_455"               
"Z_COL_456","A3"."Z_COL_457_456" "Z_COL_457","A3"."Z_COL_458_457"               
"Z_COL_458","A3"."Z_COL_459_458" "Z_COL_459","A3"."Z_COL_460_459"               
"Z_COL_460","A3"."Z_COL_461_460" "Z_COL_461","A3"."Z_COL_462_461"               
"Z_COL_462","A3"."Z_COL_463_462" "Z_COL_463","A3"."Z_COL_464_463"               
"Z_COL_464","A3"."Z_COL_465_464" "Z_COL_465","A3"."Z_COL_466_465"               
"Z_COL_466","A3"."Z_COL_467_466" "Z_COL_467","A3"."Z_COL_468_467"               
"Z_COL_468","A3"."Z_COL_469_468" "Z_COL_469","A3"."Z_COL_470_469"               
"Z_COL_470","A3"."Z_COL_471_470" "Z_COL_471","A3"."Z_COL_472_471"               
"Z_COL_472","A3"."Z_COL_473_472" "Z_COL_473","A3"."Z_COL_474_473"               
"Z_COL_474","A3"."Z_COL_475_474" "Z_COL_475","A3"."Z_COL_476_475"               
"Z_COL_476","A3"."Z_COL_477_476" "Z_COL_477","A3"."Z_COL_478_477"               
"Z_COL_478","A3"."Z_COL_479_478" "Z_COL_479","A3"."Z_COL_480_479"               
"Z_COL_480","A3"."Z_COL_481_480" "Z_COL_481","A3"."Z_COL_482_481"               
"Z_COL_482","A3"."Z_COL_483_482" "Z_COL_483","A3"."Z_COL_484_483"               
"Z_COL_484","A3"."Z_COL_485_484" "Z_COL_485","A3"."Z_COL_486_485"               
"Z_COL_486","A3"."Z_COL_487_486" "Z_COL_487","A3"."Z_COL_488_487"               
"Z_COL_488","A3"."Z_COL_489_488" "Z_COL_489","A3"."Z_COL_490_489"               
"Z_COL_490","A3"."Z_COL_491_490" "Z_COL_491","A3"."Z_COL_492_491"               
"Z_COL_492","A3"."Z_COL_493_492" "Z_COL_493","A3"."Z_COL_494_493"               
"Z_COL_494","A3"."Z_COL_495_494" "Z_COL_495","A3"."Z_COL_496_495"               
"Z_COL_496","A3"."Z_COL_497_496" "Z_COL_497","A3"."Z_COL_498_497"               
"Z_COL_498","A3"."Z_COL_499_498" "Z_COL_499","A3"."Z_COL_001_499"               
"Z_COL_001","A3"."T_COL__002_500" "T_COL__002","A3"."T_COL__003_501"            
"T_COL__003","A3"."T_COL__004_502" "T_COL__004","A3"."T_COL__005_503"           
"T_COL__005","A3"."T_COL__006_504" "T_COL__006","A3"."T_COL__007_505"           
"T_COL__007","A3"."T_COL__008_506" "T_COL__008","A3"."T_COL__009_507"           
"T_COL__009","A3"."T_COL__010_508" "T_COL__010","A3"."T_COL__011_509"           
"T_COL__011","A3"."T_COL__012_510" "T_COL__012","A3"."T_COL__013_511"           
"T_COL__013","A3"."T_COL__014_512" "T_COL__014","A3"."T_COL__015_513"           
"T_COL__015","A3"."T_COL__016_514" "T_COL__016","A3"."T_COL__017_515"           
"T_COL__017","A3"."T_COL__018_516" "T_COL__018","A3"."T_COL__019_517"           
"T_COL__019","A3"."T_COL__020_518" "T_COL__020","A3"."T_COL__021_519"           
"T_COL__021","A3"."T_COL__022_520" "T_COL__022","A3"."T_COL__023_521"           
"T_COL__023","A3"."T_COL__024_522" "T_COL__024","A3"."T_COL__025_523"           
"T_COL__025","A3"."T_COL__026_524" "T_COL__026","A3"."T_COL__027_525"           
"T_COL__027","A3"."T_COL__028_526" "T_COL__028","A3"."T_COL__029_527"           
"T_COL__029","A3"."T_COL__030_528" "T_COL__030","A3"."T_COL__031_529"           
"T_COL__031","A3"."T_COL__032_530" "T_COL__032","A3"."T_COL__033_531"           
"T_COL__033","A3"."T_COL__034_532" "T_COL__034","A3"."T_COL__035_533"           
"T_COL__035","A3"."T_COL__036_534" "T_COL__036","A3"."T_COL__037_535"           
"T_COL__037","A3"."T_COL__038_536" "T_COL__038","A3"."T_COL__039_537"           
"T_COL__039","A3"."T_COL__040_538" "T_COL__040","A3"."T_COL__041_539"           
"T_COL__041","A3"."T_COL__042_540" "T_COL__042","A3"."T_COL__043_541"           
"T_COL__043","A3"."T_COL__044_542" "T_COL__044","A3"."T_COL__045_543"           
"T_COL__045","A3"."T_COL__046_544" "T_COL__046","A3"."T_COL__047_545"           
"T_COL__047","A3"."T_COL__048_546" "T_COL__048","A3"."T_COL__049_547"           
"T_COL__049","A3"."T_COL__050_548" "T_COL__050","A3"."T_COL__051_549"           
"T_COL__051","A3"."T_COL__052_550" "T_COL__052","A3"."T_COL__053_551"           
"T_COL__053","A3"."T_COL__054_552" "T_COL__054","A3"."T_COL__055_553"           
"T_COL__055","A3"."T_COL__056_554" "T_COL__056","A3"."T_COL__057_555"           
"T_COL__057","A3"."T_COL__058_556" "T_COL__058","A3"."T_COL__059_557"           
"T_COL__059","A3"."T_COL__060_558" "T_COL__060","A3"."T_COL__061_559"           
"T_COL__061","A3"."T_COL__062_560" "T_COL__062","A3"."T_COL__063_561"           
"T_COL__063","A3"."T_COL__064_562" "T_COL__064","A3"."T_COL__065_563"           
"T_COL__065","A3"."T_COL__066_564" "T_COL__066","A3"."T_COL__067_565"           
"T_COL__067","A3"."T_COL__068_566" "T_COL__068","A3"."T_COL__069_567"           
"T_COL__069","A3"."T_COL__070_568" "T_COL__070","A3"."T_COL__071_569"           
"T_COL__071","A3"."T_COL__072_570" "T_COL__072","A3"."T_COL__073_571"           
"T_COL__073","A3"."T_COL__074_572" "T_COL__074","A3"."T_COL__075_573"           
"T_COL__075","A3"."T_COL__076_574" "T_COL__076","A3"."T_COL__077_575"           
"T_COL__077","A3"."T_COL__078_576" "T_COL__078","A3"."T_COL__079_577"           
"T_COL__079","A3"."T_COL__080_578" "T_COL__080","A3"."T_COL__081_579"           
"T_COL__081","A3"."T_COL__082_580" "T_COL__082","A3"."T_COL__083_581"           
"T_COL__083","A3"."T_COL__084_582" "T_COL__084","A3"."T_COL__085_583"           
"T_COL__085","A3"."T_COL__086_584" "T_COL__086","A3"."T_COL__087_585"           
"T_COL__087","A3"."T_COL__088_586" "T_COL__088","A3"."T_COL__089_587"           
"T_COL__089","A3"."T_COL__090_588" "T_COL__090","A3"."T_COL__091_589"           
"T_COL__091","A3"."T_COL__092_590" "T_COL__092","A3"."T_COL__093_591"           
"T_COL__093","A3"."T_COL__094_592" "T_COL__094","A3"."T_COL__095_593"           
"T_COL__095","A3"."T_COL__096_594" "T_COL__096","A3"."T_COL__097_595"           
"T_COL__097","A3"."T_COL__098_596" "T_COL__098","A3"."T_COL__099_597"           
"T_COL__099","A3"."T_COL__100_598" "T_COL__100","A3"."T_COL__101_599"           
"T_COL__101","A3"."T_COL__102_600" "T_COL__102","A3"."T_COL__103_601"           
"T_COL__103","A3"."T_COL__104_602" "T_COL__104","A3"."T_COL__105_603"           
"T_COL__105","A3"."T_COL__106_604" "T_COL__106","A3"."T_COL__107_605"           
"T_COL__107","A3"."T_COL__108_606" "T_COL__108","A3"."T_COL__109_607"           
"T_COL__109","A3"."T_COL__110_608" "T_COL__110","A3"."T_COL__111_609"           
"T_COL__111","A3"."T_COL__112_610" "T_COL__112","A3"."T_COL__113_611"           
"T_COL__113","A3"."T_COL__114_612" "T_COL__114","A3"."T_COL__115_613"           
"T_COL__115","A3"."T_COL__116_614" "T_COL__116","A3"."T_COL__117_615"           
"T_COL__117","A3"."T_COL__118_616" "T_COL__118","A3"."T_COL__119_617"           
"T_COL__119","A3"."T_COL__120_618" "T_COL__120","A3"."T_COL__121_619"           
"T_COL__121","A3"."T_COL__122_620" "T_COL__122","A3"."T_COL__123_621"           
"T_COL__123","A3"."T_COL__124_622" "T_COL__124","A3"."T_COL__125_623"           
"T_COL__125","A3"."T_COL__126_624" "T_COL__126","A3"."T_COL__127_625"           
"T_COL__127","A3"."T_COL__128_626" "T_COL__128","A3"."T_COL__129_627"           
"T_COL__129","A3"."T_COL__130_628" "T_COL__130","A3"."T_COL__131_629"           
"T_COL__131","A3"."T_COL__132_630" "T_COL__132","A3"."T_COL__133_631"           
"T_COL__133","A3"."T_COL__134_632" "T_COL__134","A3"."T_COL__135_633"           
"T_COL__135","A3"."T_COL__136_634" "T_COL__136","A3"."T_COL__137_635"           
"T_COL__137","A3"."T_COL__138_636" "T_COL__138","A3"."T_COL__139_637"           
"T_COL__139","A3"."T_COL__140_638" "T_COL__140","A3"."T_COL__141_639"           
"T_COL__141","A3"."T_COL__142_640" "T_COL__142","A3"."T_COL__143_641"           
"T_COL__143","A3"."T_COL__144_642" "T_COL__144","A3"."T_COL__145_643"           
"T_COL__145","A3"."T_COL__146_644" "T_COL__146","A3"."T_COL__147_645"           
"T_COL__147","A3"."T_COL__148_646" "T_COL__148","A3"."T_COL__149_647"           
"T_COL__149","A3"."T_COL__150_648" "T_COL__150","A3"."T_COL__151_649"           
"T_COL__151","A3"."T_COL__152_650" "T_COL__152","A3"."T_COL__153_651"           
"T_COL__153","A3"."T_COL__154_652" "T_COL__154","A3"."T_COL__155_653"           
"T_COL__155","A3"."T_COL__156_654" "T_COL__156","A3"."T_COL__157_655"           
"T_COL__157","A3"."T_COL__158_656" "T_COL__158","A3"."T_COL__159_657"           
"T_COL__159","A3"."T_COL__160_658" "T_COL__160","A3"."T_COL__161_659"           
"T_COL__161","A3"."T_COL__162_660" "T_COL__162","A3"."T_COL__163_661"           
"T_COL__163","A3"."T_COL__164_662" "T_COL__164","A3"."T_COL__165_663"           
"T_COL__165","A3"."T_COL__166_664" "T_COL__166","A3"."T_COL__167_665"           
"T_COL__167","A3"."T_COL__168_666" "T_COL__168","A3"."T_COL__169_667"           
"T_COL__169","A3"."T_COL__170_668" "T_COL__170","A3"."T_COL__171_669"           
"T_COL__171","A3"."T_COL__172_670" "T_COL__172","A3"."T_COL__173_671"           
"T_COL__173","A3"."T_COL__174_672" "T_COL__174","A3"."T_COL__175_673"           
"T_COL__175","A3"."T_COL__176_674" "T_COL__176","A3"."T_COL__177_675"           
"T_COL__177","A3"."T_COL__178_676" "T_COL__178","A3"."T_COL__179_677"           
"T_COL__179","A3"."T_COL__180_678" "T_COL__180","A3"."T_COL__181_679"           
"T_COL__181","A3"."T_COL__182_680" "T_COL__182","A3"."T_COL__183_681"           
"T_COL__183","A3"."T_COL__184_682" "T_COL__184","A3"."T_COL__185_683"           
"T_COL__185","A3"."T_COL__186_684" "T_COL__186","A3"."T_COL__187_685"           
"T_COL__187","A3"."T_COL__188_686" "T_COL__188","A3"."T_COL__189_687"           
"T_COL__189","A3"."T_COL__190_688" "T_COL__190","A3"."T_COL__191_689"           
"T_COL__191","A3"."T_COL__192_690" "T_COL__192","A3"."T_COL__193_691"           
"T_COL__193","A3"."T_COL__194_692" "T_COL__194","A3"."T_COL__195_693"           
"T_COL__195","A3"."T_COL__196_694" "T_COL__196","A3"."T_COL__197_695"           
"T_COL__197","A3"."T_COL__198_696" "T_COL__198","A3"."T_COL__199_697"           
"T_COL__199","A3"."T_COL__200_698" "T_COL__200","A3"."T_COL__201_699"           
"T_COL__201","A3"."T_COL__202_700" "T_COL__202","A3"."T_COL__203_701"           
"T_COL__203","A3"."T_COL__204_702" "T_COL__204","A3"."T_COL__205_703"           
"T_COL__205","A3"."T_COL__206_704" "T_COL__206","A3"."T_COL__207_705"           
"T_COL__207","A3"."T_COL__208_706" "T_COL__208","A3"."T_COL__209_707"           
"T_COL__209","A3"."T_COL__210_708" "T_COL__210","A3"."T_COL__211_709"           
"T_COL__211","A3"."T_COL__212_710" "T_COL__212","A3"."T_COL__213_711"           
"T_COL__213","A3"."T_COL__214_712" "T_COL__214","A3"."T_COL__215_713"           
"T_COL__215","A3"."T_COL__216_714" "T_COL__216","A3"."T_COL__217_715"           
"T_COL__217","A3"."T_COL__218_716" "T_COL__218","A3"."T_COL__219_717"           
"T_COL__219","A3"."T_COL__220_718" "T_COL__220","A3"."T_COL__221_719"           
"T_COL__221","A3"."T_COL__222_720" "T_COL__222","A3"."T_COL__223_721"           
"T_COL__223","A3"."T_COL__224_722" "T_COL__224","A3"."T_COL__225_723"           
"T_COL__225","A3"."T_COL__226_724" "T_COL__226","A3"."T_COL__227_725"           
"T_COL__227","A3"."T_COL__228_726" "T_COL__228","A3"."T_COL__229_727"           
"T_COL__229","A3"."T_COL__230_728" "T_COL__230","A3"."T_COL__231_729"           
"T_COL__231","A3"."T_COL__232_730" "T_COL__232","A3"."T_COL__233_731"           
"T_COL__233","A3"."T_COL__234_732" "T_COL__234","A3"."T_COL__235_733"           
"T_COL__235","A3"."T_COL__236_734" "T_COL__236","A3"."T_COL__237_735"           
"T_COL__237","A3"."T_COL__238_736" "T_COL__238","A3"."T_COL__239_737"           
"T_COL__239","A3"."T_COL__240_738" "T_COL__240","A3"."T_COL__241_739"           
"T_COL__241","A3"."T_COL__242_740" "T_COL__242","A3"."T_COL__243_741"           
"T_COL__243","A3"."T_COL__244_742" "T_COL__244","A3"."T_COL__245_743"           
"T_COL__245","A3"."T_COL__246_744" "T_COL__246","A3"."T_COL__247_745"           
"T_COL__247","A3"."T_COL__248_746" "T_COL__248","A3"."T_COL__249_747"           
"T_COL__249","A3"."T_COL__250_748" "T_COL__250","A3"."T_COL__251_749"           
"T_COL__251","A3"."T_COL__252_750" "T_COL__252","A3"."T_COL__253_751"           
"T_COL__253","A3"."T_COL__254_752" "T_COL__254","A3"."T_COL__255_753"           
"T_COL__255","A3"."T_COL__256_754" "T_COL__256","A3"."T_COL__257_755"           
"T_COL__257","A3"."T_COL__258_756" "T_COL__258","A3"."T_COL__259_757"           
"T_COL__259","A3"."T_COL__260_758" "T_COL__260","A3"."T_COL__261_759"           
"T_COL__261","A3"."T_COL__262_760" "T_COL__262","A3"."T_COL__263_761"           
"T_COL__263","A3"."T_COL__264_762" "T_COL__264","A3"."T_COL__265_763"           
"T_COL__265","A3"."T_COL__266_764" "T_COL__266","A3"."T_COL__267_765"           
"T_COL__267","A3"."T_COL__268_766" "T_COL__268","A3"."T_COL__269_767"           
"T_COL__269","A3"."T_COL__270_768" "T_COL__270","A3"."T_COL__271_769"           
"T_COL__271","A3"."T_COL__272_770" "T_COL__272","A3"."T_COL__273_771"           
"T_COL__273","A3"."T_COL__274_772" "T_COL__274","A3"."T_COL__275_773"           
"T_COL__275","A3"."T_COL__276_774" "T_COL__276","A3"."T_COL__277_775"           
"T_COL__277","A3"."T_COL__278_776" "T_COL__278","A3"."T_COL__279_777"           
"T_COL__279","A3"."T_COL__280_778" "T_COL__280","A3"."T_COL__281_779"           
"T_COL__281","A3"."T_COL__282_780" "T_COL__282","A3"."T_COL__283_781"           
"T_COL__283","A3"."T_COL__284_782" "T_COL__284","A3"."T_COL__285_783"           
"T_COL__285","A3"."T_COL__286_784" "T_COL__286","A3"."T_COL__287_785"           
"T_COL__287","A3"."T_COL__288_786" "T_COL__288","A3"."T_COL__289_787"           
"T_COL__289","A3"."T_COL__290_788" "T_COL__290","A3"."T_COL__291_789"           
"T_COL__291","A3"."T_COL__292_790" "T_COL__292","A3"."T_COL__293_791"           
"T_COL__293","A3"."T_COL__294_792" "T_COL__294","A3"."T_COL__295_793"           
"T_COL__295","A3"."T_COL__296_794" "T_COL__296","A3"."T_COL__297_795"           
"T_COL__297","A3"."T_COL__298_796" "T_COL__298","A3"."T_COL__299_797"           
"T_COL__299","A3"."T_COL__300_798" "T_COL__300","A3"."T_COL__301_799"           
"T_COL__301","A3"."T_COL__302_800" "T_COL__302","A3"."T_COL__303_801"           
"T_COL__303","A3"."T_COL__304_802" "T_COL__304","A3"."T_COL__305_803"           
"T_COL__305","A3"."T_COL__306_804" "T_COL__306","A3"."T_COL__307_805"           
"T_COL__307","A3"."T_COL__308_806" "T_COL__308","A3"."T_COL__309_807"           
"T_COL__309","A3"."T_COL__310_808" "T_COL__310","A3"."T_COL__311_809"           
"T_COL__311","A3"."T_COL__312_810" "T_COL__312","A3"."T_COL__313_811"           
"T_COL__313","A3"."T_COL__314_812" "T_COL__314","A3"."T_COL__315_813"           
"T_COL__315","A3"."T_COL__316_814" "T_COL__316","A3"."T_COL__317_815"           
"T_COL__317","A3"."T_COL__318_816" "T_COL__318","A3"."T_COL__319_817"           
"T_COL__319","A3"."T_COL__320_818" "T_COL__320","A3"."T_COL__321_819"           
"T_COL__321","A3"."T_COL__322_820" "T_COL__322","A3"."T_COL__323_821"           
"T_COL__323","A3"."T_COL__324_822" "T_COL__324","A3"."T_COL__325_823"           
"T_COL__325","A3"."T_COL__326_824" "T_COL__326","A3"."T_COL__327_825"           
"T_COL__327","A3"."T_COL__328_826" "T_COL__328","A3"."T_COL__329_827"           
"T_COL__329","A3"."T_COL__330_828" "T_COL__330","A3"."T_COL__331_829"           
"T_COL__331","A3"."T_COL__332_830" "T_COL__332","A3"."T_COL__333_831"           
"T_COL__333","A3"."T_COL__334_832" "T_COL__334","A3"."T_COL__335_833"           
"T_COL__335","A3"."T_COL__336_834" "T_COL__336","A3"."T_COL__337_835"           
"T_COL__337","A3"."T_COL__338_836" "T_COL__338","A3"."T_COL__339_837"           
"T_COL__339","A3"."T_COL__340_838" "T_COL__340","A3"."T_COL__341_839"           
"T_COL__341","A3"."T_COL__342_840" "T_COL__342","A3"."T_COL__343_841"           
"T_COL__343","A3"."T_COL__344_842" "T_COL__344","A3"."T_COL__345_843"           
"T_COL__345","A3"."T_COL__346_844" "T_COL__346","A3"."T_COL__347_845"           
"T_COL__347","A3"."T_COL__348_846" "T_COL__348","A3"."T_COL__349_847"           
"T_COL__349","A3"."T_COL__350_848" "T_COL__350","A3"."T_COL__351_849"           
"T_COL__351","A3"."T_COL__352_850" "T_COL__352","A3"."T_COL__353_851"           
"T_COL__353","A3"."T_COL__354_852" "T_COL__354","A3"."T_COL__355_853"           
"T_COL__355","A3"."T_COL__356_854" "T_COL__356","A3"."T_COL__357_855"           
"T_COL__357","A3"."T_COL__358_856" "T_COL__358","A3"."T_COL__359_857"           
"T_COL__359","A3"."T_COL__360_858" "T_COL__360","A3"."T_COL__361_859"           
"T_COL__361","A3"."T_COL__362_860" "T_COL__362","A3"."T_COL__363_861"           
"T_COL__363","A3"."T_COL__364_862" "T_COL__364","A3"."T_COL__365_863"           
"T_COL__365","A3"."T_COL__366_864" "T_COL__366","A3"."T_COL__367_865"           
"T_COL__367","A3"."T_COL__368_866" "T_COL__368","A3"."T_COL__369_867"           
"T_COL__369","A3"."T_COL__370_868" "T_COL__370","A3"."T_COL__371_869"           
"T_COL__371","A3"."T_COL__372_870" "T_COL__372","A3"."T_COL__373_871"           
"T_COL__373","A3"."T_COL__374_872" "T_COL__374","A3"."T_COL__375_873"           
"T_COL__375","A3"."T_COL__376_874" "T_COL__376","A3"."T_COL__377_875"           
"T_COL__377","A3"."T_COL__378_876" "T_COL__378","A3"."T_COL__379_877"           
"T_COL__379","A3"."T_COL__380_878" "T_COL__380","A3"."T_COL__381_879"           
"T_COL__381","A3"."T_COL__382_880" "T_COL__382","A3"."T_COL__383_881"           
"T_COL__383","A3"."T_COL__384_882" "T_COL__384","A3"."T_COL__385_883"           
"T_COL__385","A3"."T_COL__386_884" "T_COL__386","A3"."T_COL__387_885"           
"T_COL__387","A3"."T_COL__388_886" "T_COL__388","A3"."T_COL__389_887"           
"T_COL__389","A3"."T_COL__390_888" "T_COL__390","A3"."T_COL__391_889"           
"T_COL__391","A3"."T_COL__392_890" "T_COL__392","A3"."T_COL__393_891"           
"T_COL__393","A3"."T_COL__394_892" "T_COL__394","A3"."T_COL__395_893"           
"T_COL__395","A3"."T_COL__396_894" "T_COL__396","A3"."T_COL__397_895"           
"T_COL__397","A3"."T_COL__398_896" "T_COL__398","A3"."T_COL__399_897"           
"T_COL__399","A3"."T_COL__400_898" "T_COL__400","A3"."T_COL__401_899"           
"T_COL__401","A3"."T_COL__402_900" "T_COL__402","A3"."T_COL__403_901"           
"T_COL__403","A3"."T_COL__404_902" "T_COL__404","A3"."T_COL__405_903"           
"T_COL__405","A3"."T_COL__406_904" "T_COL__406","A3"."T_COL__407_905"           
"T_COL__407","A3"."T_COL__408_906" "T_COL__408","A3"."T_COL__409_907"           
"T_COL__409","A3"."T_COL__410_908" "T_COL__410","A3"."T_COL__411_909"           
"T_COL__411","A3"."T_COL__412_910" "T_COL__412","A3"."T_COL__413_911"           
"T_COL__413","A3"."T_COL__414_912" "T_COL__414","A3"."T_COL__415_913"           
"T_COL__415","A3"."T_COL__416_914" "T_COL__416","A3"."T_COL__417_915"           
"T_COL__417","A3"."T_COL__418_916" "T_COL__418","A3"."T_COL__419_917"           
"T_COL__419","A3"."T_COL__420_918" "T_COL__420","A3"."T_COL__421_919"           
"T_COL__421","A3"."T_COL__422_920" "T_COL__422","A3"."T_COL__423_921"           
"T_COL__423","A3"."T_COL__424_922" "T_COL__424","A3"."T_COL__425_923"           
"T_COL__425","A3"."T_COL__426_924" "T_COL__426","A3"."T_COL__427_925"           
"T_COL__427","A3"."T_COL__428_926" "T_COL__428","A3"."T_COL__429_927"           
"T_COL__429","A3"."T_COL__430_928" "T_COL__430","A3"."T_COL__431_929"           
"T_COL__431","A3"."T_COL__432_930" "T_COL__432","A3"."T_COL__433_931"           
"T_COL__433","A3"."T_COL__434_932" "T_COL__434","A3"."T_COL__435_933"           
"T_COL__435","A3"."T_COL__436_934" "T_COL__436","A3"."T_COL__437_935"           
"T_COL__437","A3"."T_COL__438_936" "T_COL__438","A3"."T_COL__439_937"           
"T_COL__439","A3"."T_COL__440_938" "T_COL__440","A3"."T_COL__441_939"           
"T_COL__441","A3"."T_COL__442_940" "T_COL__442","A3"."T_COL__443_941"           
"T_COL__443","A3"."T_COL__444_942" "T_COL__444","A3"."T_COL__445_943"           
"T_COL__445","A3"."T_COL__446_944" "T_COL__446","A3"."T_COL__447_945"           
"T_COL__447","A3"."T_COL__448_946" "T_COL__448","A3"."T_COL__449_947"           
"T_COL__449","A3"."T_COL__450_948" "T_COL__450","A3"."T_COL__451_949"           
"T_COL__451","A3"."T_COL__452_950" "T_COL__452","A3"."T_COL__453_951"           
"T_COL__453","A3"."T_COL__454_952" "T_COL__454","A3"."T_COL__455_953"           
"T_COL__455","A3"."T_COL__456_954" "T_COL__456","A3"."T_COL__457_955"           
"T_COL__457","A3"."T_COL__458_956" "T_COL__458","A3"."T_COL__459_957"           
"T_COL__459","A3"."T_COL__460_958" "T_COL__460","A3"."T_COL__461_959"           
"T_COL__461","A3"."T_COL__462_960" "T_COL__462","A3"."T_COL__463_961"           
"T_COL__463","A3"."T_COL__464_962" "T_COL__464","A3"."T_COL__465_963"           
"T_COL__465","A3"."T_COL__466_964" "T_COL__466","A3"."T_COL__467_965"           
"T_COL__467","A3"."T_COL__468_966" "T_COL__468","A3"."T_COL__469_967"           
"T_COL__469","A3"."T_COL__470_968" "T_COL__470","A3"."T_COL__471_969"           
"T_COL__471","A3"."T_COL__472_970" "T_COL__472","A3"."T_COL__473_971"           
"T_COL__473","A3"."T_COL__474_972" "T_COL__474","A3"."T_COL__475_973"           
"T_COL__475","A3"."T_COL__476_974" "T_COL__476","A3"."T_COL__477_975"           
"T_COL__477","A3"."T_COL__478_976" "T_COL__478","A3"."T_COL__479_977"           
"T_COL__479","A3"."T_COL__480_978" "T_COL__480","A3"."T_COL__481_979"           
"T_COL__481","A3"."T_COL__482_980" "T_COL__482","A3"."T_COL__483_981"           
"T_COL__483","A3"."T_COL__484_982" "T_COL__484","A3"."T_COL__485_983"           
"T_COL__485","A3"."T_COL__486_984" "T_COL__486","A3"."T_COL__487_985"           
"T_COL__487","A3"."T_COL__488_986" "T_COL__488","A3"."T_COL__489_987"           
"T_COL__489","A3"."T_COL__490_988" "T_COL__490","A3"."T_COL__491_989"           
"T_COL__491","A3"."T_COL__492_990" "T_COL__492","A3"."T_COL__493_991"           
"T_COL__493","A3"."T_COL__494_992" "T_COL__494","A3"."T_COL__495_993"           
"T_COL__495","A3"."T_COL__496_994" "T_COL__496","A3"."T_COL__497_995"           
"T_COL__497","A3"."T_COL__498_996" "T_COL__498","A3"."T_COL__499_997"           
"T_COL__499","A2"."Z_COL_001" "Z_COL_001_998","A2"."P_COLUMN_002"               
"P_COLUMN_002_999" FROM  (SELECT "A5"."Z_COL_001" "Z_COL_001_0","A5"."Z_COL_002"
"Z_COL_002_1","A5"."Z_COL_003" "Z_COL_003_2","A5"."Z_COL_004"                   
"Z_COL_004_3","A5"."Z_COL_005" "Z_COL_005_4","A5"."Z_COL_006"                   
"Z_COL_006_5","A5"."Z_COL_007" "Z_COL_007_6","A5"."Z_COL_008"                   
"Z_COL_008_7","A5"."Z_COL_009" "Z_COL_009_8","A5"."Z_COL_010"                   
"Z_COL_010_9","A5"."Z_COL_011" "Z_COL_011_10","A5"."Z_COL_012"                  
"Z_COL_012_11","A5"."Z_COL_013" "Z_COL_013_12","A5"."Z_COL_014"                 
"Z_COL_014_13","A5"."Z_COL_015" "Z_COL_015_14","A5"."Z_COL_016"                 
"Z_COL_016_15","A5"."Z_COL_017" "Z_COL_017_16","A5"."Z_COL_018"                 
"Z_COL_018_17","A5"."Z_COL_019" "Z_COL_019_18","A5"."Z_COL_020"                 
"Z_COL_020_19","A5"."Z_COL_021" "Z_COL_021_20","A5"."Z_COL_022"                 
"Z_COL_022_21","A5"."Z_COL_023" "Z_COL_023_22","A5"."Z_COL_024"                 
"Z_COL_024_23","A5"."Z_COL_025" "Z_COL_025_24","A5"."Z_COL_026"                 
"Z_COL_026_25","A5"."Z_COL_027" "Z_COL_027_26","A5"."Z_COL_028"                 
"Z_COL_028_27","A5"."Z_COL_029" "Z_COL_029_28","A5"."Z_COL_030"                 
"Z_COL_030_29","A5"."Z_COL_031" "Z_COL_031_30","A5"."Z_COL_032"                 
"Z_COL_032_31","A5"."Z_COL_033" "Z_COL_033_32","A5"."Z_COL_034"                 
"Z_COL_034_33","A5"."Z_COL_035" "Z_COL_035_34","A5"."Z_COL_036"                 
"Z_COL_036_35","A5"."Z_COL_037" "Z_COL_037_36","A5"."Z_COL_038"                 
"Z_COL_038_37","A5"."Z_COL_039" "Z_COL_039_38","A5"."Z_COL_040"                 
"Z_COL_040_39","A5"."Z_COL_041" "Z_COL_041_40","A5"."Z_COL_042"                 
"Z_COL_042_41","A5"."Z_COL_043" "Z_COL_043_42","A5"."Z_COL_044"                 
"Z_COL_044_43","A5"."Z_COL_045" "Z_COL_045_44","A5"."Z_COL_046"                 
"Z_COL_046_45","A5"."Z_COL_047" "Z_COL_047_46","A5"."Z_COL_048"                 
"Z_COL_048_47","A5"."Z_COL_049" "Z_COL_049_48","A5"."Z_COL_050"                 
"Z_COL_050_49","A5"."Z_COL_051" "Z_COL_051_50","A5"."Z_COL_052"                 
"Z_COL_052_51","A5"."Z_COL_053" "Z_COL_053_52","A5"."Z_COL_054"                 
"Z_COL_054_53","A5"."Z_COL_055" "Z_COL_055_54","A5"."Z_COL_056"                 
"Z_COL_056_55","A5"."Z_COL_057" "Z_COL_057_56","A5"."Z_COL_058"                 
"Z_COL_058_57","A5"."Z_COL_059" "Z_COL_059_58","A5"."Z_COL_060"                 
"Z_COL_060_59","A5"."Z_COL_061" "Z_COL_061_60","A5"."Z_COL_062"                 
"Z_COL_062_61","A5"."Z_COL_063" "Z_COL_063_62","A5"."Z_COL_064"                 
"Z_COL_064_63","A5"."Z_COL_065" "Z_COL_065_64","A5"."Z_COL_066"                 
"Z_COL_066_65","A5"."Z_COL_067" "Z_COL_067_66","A5"."Z_COL_068"                 
"Z_COL_068_67","A5"."Z_COL_069" "Z_COL_069_68","A5"."Z_COL_070"                 
"Z_COL_070_69","A5"."Z_COL_071" "Z_COL_071_70","A5"."Z_COL_072"                 
"Z_COL_072_71","A5"."Z_COL_073" "Z_COL_073_72","A5"."Z_COL_074"                 
"Z_COL_074_73","A5"."Z_COL_075" "Z_COL_075_74","A5"."Z_COL_076"                 
"Z_COL_076_75","A5"."Z_COL_077" "Z_COL_077_76","A5"."Z_COL_078"                 
"Z_COL_078_77","A5"."Z_COL_079" "Z_COL_079_78","A5"."Z_COL_080"                 
"Z_COL_080_79","A5"."Z_COL_081" "Z_COL_081_80","A5"."Z_COL_082"                 
"Z_COL_082_81","A5"."Z_COL_083" "Z_COL_083_82","A5"."Z_COL_084"                 
"Z_COL_084_83","A5"."Z_COL_085" "Z_COL_085_84","A5"."Z_COL_086"                 
"Z_COL_086_85","A5"."Z_COL_087" "Z_COL_087_86","A5"."Z_COL_088"                 
"Z_COL_088_87","A5"."Z_COL_089" "Z_COL_089_88","A5"."Z_COL_090"                 
"Z_COL_090_89","A5"."Z_COL_091" "Z_COL_091_90","A5"."Z_COL_092"                 
"Z_COL_092_91","A5"."Z_COL_093" "Z_COL_093_92","A5"."Z_COL_094"                 
"Z_COL_094_93","A5"."Z_COL_095" "Z_COL_095_94","A5"."Z_COL_096"                 
"Z_COL_096_95","A5"."Z_COL_097" "Z_COL_097_96","A5"."Z_COL_098"                 
"Z_COL_098_97","A5"."Z_COL_099" "Z_COL_099_98","A5"."Z_COL_100"                 
"Z_COL_100_99","A5"."Z_COL_101" "Z_COL_101_100","A5"."Z_COL_102"                
"Z_COL_102_101","A5"."Z_COL_103" "Z_COL_103_102","A5"."Z_COL_104"               
"Z_COL_104_103","A5"."Z_COL_105" "Z_COL_105_104","A5"."Z_COL_106"               
"Z_COL_106_105","A5"."Z_COL_107" "Z_COL_107_106","A5"."Z_COL_108"               
"Z_COL_108_107","A5"."Z_COL_109" "Z_COL_109_108","A5"."Z_COL_110"               
"Z_COL_110_109","A5"."Z_COL_111" "Z_COL_111_110","A5"."Z_COL_112"               
"Z_COL_112_111","A5"."Z_COL_113" "Z_COL_113_112","A5"."Z_COL_114"               
"Z_COL_114_113","A5"."Z_COL_115" "Z_COL_115_114","A5"."Z_COL_116"               
"Z_COL_116_115","A5"."Z_COL_117" "Z_COL_117_116","A5"."Z_COL_118"               
"Z_COL_118_117","A5"."Z_COL_119" "Z_COL_119_118","A5"."Z_COL_120"               
"Z_COL_120_119","A5"."Z_COL_121" "Z_COL_121_120","A5"."Z_COL_122"               
"Z_COL_122_121","A5"."Z_COL_123" "Z_COL_123_122","A5"."Z_COL_124"               
"Z_COL_124_123","A5"."Z_COL_125" "Z_COL_125_124","A5"."Z_COL_126"               
"Z_COL_126_125","A5"."Z_COL_127" "Z_COL_127_126","A5"."Z_COL_128"               
"Z_COL_128_127","A5"."Z_COL_129" "Z_COL_129_128","A5"."Z_COL_130"               
"Z_COL_130_129","A5"."Z_COL_131" "Z_COL_131_130","A5"."Z_COL_132"               
"Z_COL_132_131","A5"."Z_COL_133" "Z_COL_133_132","A5"."Z_COL_134"               
"Z_COL_134_133","A5"."Z_COL_135" "Z_COL_135_134","A5"."Z_COL_136"               
"Z_COL_136_135","A5"."Z_COL_137" "Z_COL_137_136","A5"."Z_COL_138"               
"Z_COL_138_137","A5"."Z_COL_139" "Z_COL_139_138","A5"."Z_COL_140"               
"Z_COL_140_139","A5"."Z_COL_141" "Z_COL_141_140","A5"."Z_COL_142"               
"Z_COL_142_141","A5"."Z_COL_143" "Z_COL_143_142","A5"."Z_COL_144"               
"Z_COL_144_143","A5"."Z_COL_145" "Z_COL_145_144","A5"."Z_COL_146"               
"Z_COL_146_145","A5"."Z_COL_147" "Z_COL_147_146","A5"."Z_COL_148"               
"Z_COL_148_147","A5"."Z_COL_149" "Z_COL_149_148","A5"."Z_COL_150"               
"Z_COL_150_149","A5"."Z_COL_151" "Z_COL_151_150","A5"."Z_COL_152"               
"Z_COL_152_151","A5"."Z_COL_153" "Z_COL_153_152","A5"."Z_COL_154"               
"Z_COL_154_153","A5"."Z_COL_155" "Z_COL_155_154","A5"."Z_COL_156"               
"Z_COL_156_155","A5"."Z_COL_157" "Z_COL_157_156","A5"."Z_COL_158"               
"Z_COL_158_157","A5"."Z_COL_159" "Z_COL_159_158","A5"."Z_COL_160"               
"Z_COL_160_159","A5"."Z_COL_161" "Z_COL_161_160","A5"."Z_COL_162"               
"Z_COL_162_161","A5"."Z_COL_163" "Z_COL_163_162","A5"."Z_COL_164"               
"Z_COL_164_163","A5"."Z_COL_165" "Z_COL_165_164","A5"."Z_COL_166"               
"Z_COL_166_165","A5"."Z_COL_167" "Z_COL_167_166","A5"."Z_COL_168"               
"Z_COL_168_167","A5"."Z_COL_169" "Z_COL_169_168","A5"."Z_COL_170"               
"Z_COL_170_169","A5"."Z_COL_171" "Z_COL_171_170","A5"."Z_COL_172"               
"Z_COL_172_171","A5"."Z_COL_173" "Z_COL_173_172","A5"."Z_COL_174"               
"Z_COL_174_173","A5"."Z_COL_175" "Z_COL_175_174","A5"."Z_COL_176"               
"Z_COL_176_175","A5"."Z_COL_177" "Z_COL_177_176","A5"."Z_COL_178"               
"Z_COL_178_177","A5"."Z_COL_179" "Z_COL_179_178","A5"."Z_COL_180"               
"Z_COL_180_179","A5"."Z_COL_181" "Z_COL_181_180","A5"."Z_COL_182"               
"Z_COL_182_181","A5"."Z_COL_183" "Z_COL_183_182","A5"."Z_COL_184"               
"Z_COL_184_183","A5"."Z_COL_185" "Z_COL_185_184","A5"."Z_COL_186"               
"Z_COL_186_185","A5"."Z_COL_187" "Z_COL_187_186","A5"."Z_COL_188"               
"Z_COL_188_187","A5"."Z_COL_189" "Z_COL_189_188","A5"."Z_COL_190"               
"Z_COL_190_189","A5"."Z_COL_191" "Z_COL_191_190","A5"."Z_COL_192"               
"Z_COL_192_191","A5"."Z_COL_193" "Z_COL_193_192","A5"."Z_COL_194"               
"Z_COL_194_193","A5"."Z_COL_195" "Z_COL_195_194","A5"."Z_COL_196"               
"Z_COL_196_195","A5"."Z_COL_197" "Z_COL_197_196","A5"."Z_COL_198"               
"Z_COL_198_197","A5"."Z_COL_199" "Z_COL_199_198","A5"."Z_COL_200"               
"Z_COL_200_199","A5"."Z_COL_201" "Z_COL_201_200","A5"."Z_COL_202"               
"Z_COL_202_201","A5"."Z_COL_203" "Z_COL_203_202","A5"."Z_COL_204"               
"Z_COL_204_203","A5"."Z_COL_205" "Z_COL_205_204","A5"."Z_COL_206"               
"Z_COL_206_205","A5"."Z_COL_207" "Z_COL_207_206","A5"."Z_COL_208"               
"Z_COL_208_207","A5"."Z_COL_209" "Z_COL_209_208","A5"."Z_COL_210"               
"Z_COL_210_209","A5"."Z_COL_211" "Z_COL_211_210","A5"."Z_COL_212"               
"Z_COL_212_211","A5"."Z_COL_213" "Z_COL_213_212","A5"."Z_COL_214"               
"Z_COL_214_213","A5"."Z_COL_215" "Z_COL_215_214","A5"."Z_COL_216"               
"Z_COL_216_215","A5"."Z_COL_217" "Z_COL_217_216","A5"."Z_COL_218"               
"Z_COL_218_217","A5"."Z_COL_219" "Z_COL_219_218","A5"."Z_COL_220"               
"Z_COL_220_219","A5"."Z_COL_221" "Z_COL_221_220","A5"."Z_COL_222"               
"Z_COL_222_221","A5"."Z_COL_223" "Z_COL_223_222","A5"."Z_COL_224"               
"Z_COL_224_223","A5"."Z_COL_225" "Z_COL_225_224","A5"."Z_COL_226"               
"Z_COL_226_225","A5"."Z_COL_227" "Z_COL_227_226","A5"."Z_COL_228"               
"Z_COL_228_227","A5"."Z_COL_229" "Z_COL_229_228","A5"."Z_COL_230"               
"Z_COL_230_229","A5"."Z_COL_231" "Z_COL_231_230","A5"."Z_COL_232"               
"Z_COL_232_231","A5"."Z_COL_233" "Z_COL_233_232","A5"."Z_COL_234"               
"Z_COL_234_233","A5"."Z_COL_235" "Z_COL_235_234","A5"."Z_COL_236"               
"Z_COL_236_235","A5"."Z_COL_237" "Z_COL_237_236","A5"."Z_COL_238"               
"Z_COL_238_237","A5"."Z_COL_239" "Z_COL_239_238","A5"."Z_COL_240"               
"Z_COL_240_239","A5"."Z_COL_241" "Z_COL_241_240","A5"."Z_COL_242"               
"Z_COL_242_241","A5"."Z_COL_243" "Z_COL_243_242","A5"."Z_COL_244"               
"Z_COL_244_243","A5"."Z_COL_245" "Z_COL_245_244","A5"."Z_COL_246"               
"Z_COL_246_245","A5"."Z_COL_247" "Z_COL_247_246","A5"."Z_COL_248"               
"Z_COL_248_247","A5"."Z_COL_249" "Z_COL_249_248","A5"."Z_COL_250"               
"Z_COL_250_249","A5"."Z_COL_251" "Z_COL_251_250","A5"."Z_COL_252"               
"Z_COL_252_251","A5"."Z_COL_253" "Z_COL_253_252","A5"."Z_COL_254"               
"Z_COL_254_253","A5"."Z_COL_255" "Z_COL_255_254","A5"."Z_COL_256"               
"Z_COL_256_255","A5"."Z_COL_257" "Z_COL_257_256","A5"."Z_COL_258"               
"Z_COL_258_257","A5"."Z_COL_259" "Z_COL_259_258","A5"."Z_COL_260"               
"Z_COL_260_259","A5"."Z_COL_261" "Z_COL_261_260","A5"."Z_COL_262"               
"Z_COL_262_261","A5"."Z_COL_263" "Z_COL_263_262","A5"."Z_COL_264"               
"Z_COL_264_263","A5"."Z_COL_265" "Z_COL_265_264","A5"."Z_COL_266"               
"Z_COL_266_265","A5"."Z_COL_267" "Z_COL_267_266","A5"."Z_COL_268"               
"Z_COL_268_267","A5"."Z_COL_269" "Z_COL_269_268","A5"."Z_COL_270"               
"Z_COL_270_269","A5"."Z_COL_271" "Z_COL_271_270","A5"."Z_COL_272"               
"Z_COL_272_271","A5"."Z_COL_273" "Z_COL_273_272","A5"."Z_COL_274"               
"Z_COL_274_273","A5"."Z_COL_275" "Z_COL_275_274","A5"."Z_COL_276"               
"Z_COL_276_275","A5"."Z_COL_277" "Z_COL_277_276","A5"."Z_COL_278"               
"Z_COL_278_277","A5"."Z_COL_279" "Z_COL_279_278","A5"."Z_COL_280"               
"Z_COL_280_279","A5"."Z_COL_281" "Z_COL_281_280","A5"."Z_COL_282"               
"Z_COL_282_281","A5"."Z_COL_283" "Z_COL_283_282","A5"."Z_COL_284"               
"Z_COL_284_283","A5"."Z_COL_285" "Z_COL_285_284","A5"."Z_COL_286"               
"Z_COL_286_285","A5"."Z_COL_287" "Z_COL_287_286","A5"."Z_COL_288"               
"Z_COL_288_287","A5"."Z_COL_289" "Z_COL_289_288","A5"."Z_COL_290"               
"Z_COL_290_289","A5"."Z_COL_291" "Z_COL_291_290","A5"."Z_COL_292"               
"Z_COL_292_291","A5"."Z_COL_293" "Z_COL_293_292","A5"."Z_COL_294"               
"Z_COL_294_293","A5"."Z_COL_295" "Z_COL_295_294","A5"."Z_COL_296"               
"Z_COL_296_295","A5"."Z_COL_297" "Z_COL_297_296","A5"."Z_COL_298"               
"Z_COL_298_297","A5"."Z_COL_299" "Z_COL_299_298","A5"."Z_COL_300"               
"Z_COL_300_299","A5"."Z_COL_301" "Z_COL_301_300","A5"."Z_COL_302"               
"Z_COL_302_301","A5"."Z_COL_303" "Z_COL_303_302","A5"."Z_COL_304"               
"Z_COL_304_303","A5"."Z_COL_305" "Z_COL_305_304","A5"."Z_COL_306"               
"Z_COL_306_305","A5"."Z_COL_307" "Z_COL_307_306","A5"."Z_COL_308"               
"Z_COL_308_307","A5"."Z_COL_309" "Z_COL_309_308","A5"."Z_COL_310"               
"Z_COL_310_309","A5"."Z_COL_311" "Z_COL_311_310","A5"."Z_COL_312"               
"Z_COL_312_311","A5"."Z_COL_313" "Z_COL_313_312","A5"."Z_COL_314"               
"Z_COL_314_313","A5"."Z_COL_315" "Z_COL_315_314","A5"."Z_COL_316"               
"Z_COL_316_315","A5"."Z_COL_317" "Z_COL_317_316","A5"."Z_COL_318"               
"Z_COL_318_317","A5"."Z_COL_319" "Z_COL_319_318","A5"."Z_COL_320"               
"Z_COL_320_319","A5"."Z_COL_321" "Z_COL_321_320","A5"."Z_COL_322"               
"Z_COL_322_321","A5"."Z_COL_323" "Z_COL_323_322","A5"."Z_COL_324"               
"Z_COL_324_323","A5"."Z_COL_325" "Z_COL_325_324","A5"."Z_COL_326"               
"Z_COL_326_325","A5"."Z_COL_327" "Z_COL_327_326","A5"."Z_COL_328"               
"Z_COL_328_327","A5"."Z_COL_329" "Z_COL_329_328","A5"."Z_COL_330"               
"Z_COL_330_329","A5"."Z_COL_331" "Z_COL_331_330","A5"."Z_COL_332"               
"Z_COL_332_331","A5"."Z_COL_333" "Z_COL_333_332","A5"."Z_COL_334"               
"Z_COL_334_333","A5"."Z_COL_335" "Z_COL_335_334","A5"."Z_COL_336"               
"Z_COL_336_335","A5"."Z_COL_337" "Z_COL_337_336","A5"."Z_COL_338"               
"Z_COL_338_337","A5"."Z_COL_339" "Z_COL_339_338","A5"."Z_COL_340"               
"Z_COL_340_339","A5"."Z_COL_341" "Z_COL_341_340","A5"."Z_COL_342"               
"Z_COL_342_341","A5"."Z_COL_343" "Z_COL_343_342","A5"."Z_COL_344"               
"Z_COL_344_343","A5"."Z_COL_345" "Z_COL_345_344","A5"."Z_COL_346"               
"Z_COL_346_345","A5"."Z_COL_347" "Z_COL_347_346","A5"."Z_COL_348"               
"Z_COL_348_347","A5"."Z_COL_349" "Z_COL_349_348","A5"."Z_COL_350"               
"Z_COL_350_349","A5"."Z_COL_351" "Z_COL_351_350","A5"."Z_COL_352"               
"Z_COL_352_351","A5"."Z_COL_353" "Z_COL_353_352","A5"."Z_COL_354"               
"Z_COL_354_353","A5"."Z_COL_355" "Z_COL_355_354","A5"."Z_COL_356"               
"Z_COL_356_355","A5"."Z_COL_357" "Z_COL_357_356","A5"."Z_COL_358"               
"Z_COL_358_357","A5"."Z_COL_359" "Z_COL_359_358","A5"."Z_COL_360"               
"Z_COL_360_359","A5"."Z_COL_361" "Z_COL_361_360","A5"."Z_COL_362"               
"Z_COL_362_361","A5"."Z_COL_363" "Z_COL_363_362","A5"."Z_COL_364"               
"Z_COL_364_363","A5"."Z_COL_365" "Z_COL_365_364","A5"."Z_COL_366"               
"Z_COL_366_365","A5"."Z_COL_367" "Z_COL_367_366","A5"."Z_COL_368"               
"Z_COL_368_367","A5"."Z_COL_369" "Z_COL_369_368","A5"."Z_COL_370"               
"Z_COL_370_369","A5"."Z_COL_371" "Z_COL_371_370","A5"."Z_COL_372"               
"Z_COL_372_371","A5"."Z_COL_373" "Z_COL_373_372","A5"."Z_COL_374"               
"Z_COL_374_373","A5"."Z_COL_375" "Z_COL_375_374","A5"."Z_COL_376"               
"Z_COL_376_375","A5"."Z_COL_377" "Z_COL_377_376","A5"."Z_COL_378"               
"Z_COL_378_377","A5"."Z_COL_379" "Z_COL_379_378","A5"."Z_COL_380"               
"Z_COL_380_379","A5"."Z_COL_381" "Z_COL_381_380","A5"."Z_COL_382"               
"Z_COL_382_381","A5"."Z_COL_383" "Z_COL_383_382","A5"."Z_COL_384"               
"Z_COL_384_383","A5"."Z_COL_385" "Z_COL_385_384","A5"."Z_COL_386"               
"Z_COL_386_385","A5"."Z_COL_387" "Z_COL_387_386","A5"."Z_COL_388"               
"Z_COL_388_387","A5"."Z_COL_389" "Z_COL_389_388","A5"."Z_COL_390"               
"Z_COL_390_389","A5"."Z_COL_391" "Z_COL_391_390","A5"."Z_COL_392"               
"Z_COL_392_391","A5"."Z_COL_393" "Z_COL_393_392","A5"."Z_COL_394"               
"Z_COL_394_393","A5"."Z_COL_395" "Z_COL_395_394","A5"."Z_COL_396"               
"Z_COL_396_395","A5"."Z_COL_397" "Z_COL_397_396","A5"."Z_COL_398"               
"Z_COL_398_397","A5"."Z_COL_399" "Z_COL_399_398","A5"."Z_COL_400"               
"Z_COL_400_399","A5"."Z_COL_401" "Z_COL_401_400","A5"."Z_COL_402"               
"Z_COL_402_401","A5"."Z_COL_403" "Z_COL_403_402","A5"."Z_COL_404"               
"Z_COL_404_403","A5"."Z_COL_405" "Z_COL_405_404","A5"."Z_COL_406"               
"Z_COL_406_405","A5"."Z_COL_407" "Z_COL_407_406","A5"."Z_COL_408"               
"Z_COL_408_407","A5"."Z_COL_409" "Z_COL_409_408","A5"."Z_COL_410"               
"Z_COL_410_409","A5"."Z_COL_411" "Z_COL_411_410","A5"."Z_COL_412"               
"Z_COL_412_411","A5"."Z_COL_413" "Z_COL_413_412","A5"."Z_COL_414"               
"Z_COL_414_413","A5"."Z_COL_415" "Z_COL_415_414","A5"."Z_COL_416"               
"Z_COL_416_415","A5"."Z_COL_417" "Z_COL_417_416","A5"."Z_COL_418"               
"Z_COL_418_417","A5"."Z_COL_419" "Z_COL_419_418","A5"."Z_COL_420"               
"Z_COL_420_419","A5"."Z_COL_421" "Z_COL_421_420","A5"."Z_COL_422"               
"Z_COL_422_421","A5"."Z_COL_423" "Z_COL_423_422","A5"."Z_COL_424"               
"Z_COL_424_423","A5"."Z_COL_425" "Z_COL_425_424","A5"."Z_COL_426"               
"Z_COL_426_425","A5"."Z_COL_427" "Z_COL_427_426","A5"."Z_COL_428"               
"Z_COL_428_427","A5"."Z_COL_429" "Z_COL_429_428","A5"."Z_COL_430"               
"Z_COL_430_429","A5"."Z_COL_431" "Z_COL_431_430","A5"."Z_COL_432"               
"Z_COL_432_431","A5"."Z_COL_433" "Z_COL_433_432","A5"."Z_COL_434"               
"Z_COL_434_433","A5"."Z_COL_435" "Z_COL_435_434","A5"."Z_COL_436"               
"Z_COL_436_435","A5"."Z_COL_437" "Z_COL_437_436","A5"."Z_COL_438"               
"Z_COL_438_437","A5"."Z_COL_439" "Z_COL_439_438","A5"."Z_COL_440"               
"Z_COL_440_439","A5"."Z_COL_441" "Z_COL_441_440","A5"."Z_COL_442"               
"Z_COL_442_441","A5"."Z_COL_443" "Z_COL_443_442","A5"."Z_COL_444"               
"Z_COL_444_443","A5"."Z_COL_445" "Z_COL_445_444","A5"."Z_COL_446"               
"Z_COL_446_445","A5"."Z_COL_447" "Z_COL_447_446","A5"."Z_COL_448"               
"Z_COL_448_447","A5"."Z_COL_449" "Z_COL_449_448","A5"."Z_COL_450"               
"Z_COL_450_449","A5"."Z_COL_451" "Z_COL_451_450","A5"."Z_COL_452"               
"Z_COL_452_451","A5"."Z_COL_453" "Z_COL_453_452","A5"."Z_COL_454"               
"Z_COL_454_453","A5"."Z_COL_455" "Z_COL_455_454","A5"."Z_COL_456"               
"Z_COL_456_455","A5"."Z_COL_457" "Z_COL_457_456","A5"."Z_COL_458"               
"Z_COL_458_457","A5"."Z_COL_459" "Z_COL_459_458","A5"."Z_COL_460"               
"Z_COL_460_459","A5"."Z_COL_461" "Z_COL_461_460","A5"."Z_COL_462"               
"Z_COL_462_461","A5"."Z_COL_463" "Z_COL_463_462","A5"."Z_COL_464"               
"Z_COL_464_463","A5"."Z_COL_465" "Z_COL_465_464","A5"."Z_COL_466"               
"Z_COL_466_465","A5"."Z_COL_467" "Z_COL_467_466","A5"."Z_COL_468"               
"Z_COL_468_467","A5"."Z_COL_469" "Z_COL_469_468","A5"."Z_COL_470"               
"Z_COL_470_469","A5"."Z_COL_471" "Z_COL_471_470","A5"."Z_COL_472"               
"Z_COL_472_471","A5"."Z_COL_473" "Z_COL_473_472","A5"."Z_COL_474"               
"Z_COL_474_473","A5"."Z_COL_475" "Z_COL_475_474","A5"."Z_COL_476"               
"Z_COL_476_475","A5"."Z_COL_477" "Z_COL_477_476","A5"."Z_COL_478"               
"Z_COL_478_477","A5"."Z_COL_479" "Z_COL_479_478","A5"."Z_COL_480"               
"Z_COL_480_479","A5"."Z_COL_481" "Z_COL_481_480","A5"."Z_COL_482"               
"Z_COL_482_481","A5"."Z_COL_483" "Z_COL_483_482","A5"."Z_COL_484"               
"Z_COL_484_483","A5"."Z_COL_485" "Z_COL_485_484","A5"."Z_COL_486"               
"Z_COL_486_485","A5"."Z_COL_487" "Z_COL_487_486","A5"."Z_COL_488"               
"Z_COL_488_487","A5"."Z_COL_489" "Z_COL_489_488","A5"."Z_COL_490"               
"Z_COL_490_489","A5"."Z_COL_491" "Z_COL_491_490","A5"."Z_COL_492"               
"Z_COL_492_491","A5"."Z_COL_493" "Z_COL_493_492","A5"."Z_COL_494"               
"Z_COL_494_493","A5"."Z_COL_495" "Z_COL_495_494","A5"."Z_COL_496"               
"Z_COL_496_495","A5"."Z_COL_497" "Z_COL_497_496","A5"."Z_COL_498"               
"Z_COL_498_497","A5"."Z_COL_499" "Z_COL_499_498","A4"."Z_COL_001"               
"Z_COL_001_499","A4"."T_COL__002" "T_COL__002_500","A4"."T_COL__003"            
"T_COL__003_501","A4"."T_COL__004" "T_COL__004_502","A4"."T_COL__005"           
"T_COL__005_503","A4"."T_COL__006" "T_COL__006_504","A4"."T_COL__007"           
"T_COL__007_505","A4"."T_COL__008" "T_COL__008_506","A4"."T_COL__009"           
"T_COL__009_507","A4"."T_COL__010" "T_COL__010_508","A4"."T_COL__011"           
"T_COL__011_509","A4"."T_COL__012" "T_COL__012_510","A4"."T_COL__013"           
"T_COL__013_511","A4"."T_COL__014" "T_COL__014_512","A4"."T_COL__015"           
"T_COL__015_513","A4"."T_COL__016" "T_COL__016_514","A4"."T_COL__017"           
"T_COL__017_515","A4"."T_COL__018" "T_COL__018_516","A4"."T_COL__019"           
"T_COL__019_517","A4"."T_COL__020" "T_COL__020_518","A4"."T_COL__021"           
"T_COL__021_519","A4"."T_COL__022" "T_COL__022_520","A4"."T_COL__023"           
"T_COL__023_521","A4"."T_COL__024" "T_COL__024_522","A4"."T_COL__025"           
"T_COL__025_523","A4"."T_COL__026" "T_COL__026_524","A4"."T_COL__027"           
"T_COL__027_525","A4"."T_COL__028" "T_COL__028_526","A4"."T_COL__029"           
"T_COL__029_527","A4"."T_COL__030" "T_COL__030_528","A4"."T_COL__031"           
"T_COL__031_529","A4"."T_COL__032" "T_COL__032_530","A4"."T_COL__033"           
"T_COL__033_531","A4"."T_COL__034" "T_COL__034_532","A4"."T_COL__035"           
"T_COL__035_533","A4"."T_COL__036" "T_COL__036_534","A4"."T_COL__037"           
"T_COL__037_535","A4"."T_COL__038" "T_COL__038_536","A4"."T_COL__039"           
"T_COL__039_537","A4"."T_COL__040" "T_COL__040_538","A4"."T_COL__041"           
"T_COL__041_539","A4"."T_COL__042" "T_COL__042_540","A4"."T_COL__043"           
"T_COL__043_541","A4"."T_COL__044" "T_COL__044_542","A4"."T_COL__045"           
"T_COL__045_543","A4"."T_COL__046" "T_COL__046_544","A4"."T_COL__047"           
"T_COL__047_545","A4"."T_COL__048" "T_COL__048_546","A4"."T_COL__049"           
"T_COL__049_547","A4"."T_COL__050" "T_COL__050_548","A4"."T_COL__051"           
"T_COL__051_549","A4"."T_COL__052" "T_COL__052_550","A4"."T_COL__053"           
"T_COL__053_551","A4"."T_COL__054" "T_COL__054_552","A4"."T_COL__055"           
"T_COL__055_553","A4"."T_COL__056" "T_COL__056_554","A4"."T_COL__057"           
"T_COL__057_555","A4"."T_COL__058" "T_COL__058_556","A4"."T_COL__059"           
"T_COL__059_557","A4"."T_COL__060" "T_COL__060_558","A4"."T_COL__061"           
"T_COL__061_559","A4"."T_COL__062" "T_COL__062_560","A4"."T_COL__063"           
"T_COL__063_561","A4"."T_COL__064" "T_COL__064_562","A4"."T_COL__065"           
"T_COL__065_563","A4"."T_COL__066" "T_COL__066_564","A4"."T_COL__067"           
"T_COL__067_565","A4"."T_COL__068" "T_COL__068_566","A4"."T_COL__069"           
"T_COL__069_567","A4"."T_COL__070" "T_COL__070_568","A4"."T_COL__071"           
"T_COL__071_569","A4"."T_COL__072" "T_COL__072_570","A4"."T_COL__073"           
"T_COL__073_571","A4"."T_COL__074" "T_COL__074_572","A4"."T_COL__075"           
"T_COL__075_573","A4"."T_COL__076" "T_COL__076_574","A4"."T_COL__077"           
"T_COL__077_575","A4"."T_COL__078" "T_COL__078_576","A4"."T_COL__079"           
"T_COL__079_577","A4"."T_COL__080" "T_COL__080_578","A4"."T_COL__081"           
"T_COL__081_579","A4"."T_COL__082" "T_COL__082_580","A4"."T_COL__083"           
"T_COL__083_581","A4"."T_COL__084" "T_COL__084_582","A4"."T_COL__085"           
"T_COL__085_583","A4"."T_COL__086" "T_COL__086_584","A4"."T_COL__087"           
"T_COL__087_585","A4"."T_COL__088" "T_COL__088_586","A4"."T_COL__089"           
"T_COL__089_587","A4"."T_COL__090" "T_COL__090_588","A4"."T_COL__091"           
"T_COL__091_589","A4"."T_COL__092" "T_COL__092_590","A4"."T_COL__093"           
"T_COL__093_591","A4"."T_COL__094" "T_COL__094_592","A4"."T_COL__095"           
"T_COL__095_593","A4"."T_COL__096" "T_COL__096_594","A4"."T_COL__097"           
"T_COL__097_595","A4"."T_COL__098" "T_COL__098_596","A4"."T_COL__099"           
"T_COL__099_597","A4"."T_COL__100" "T_COL__100_598","A4"."T_COL__101"           
"T_COL__101_599","A4"."T_COL__102" "T_COL__102_600","A4"."T_COL__103"           
"T_COL__103_601","A4"."T_COL__104" "T_COL__104_602","A4"."T_COL__105"           
"T_COL__105_603","A4"."T_COL__106" "T_COL__106_604","A4"."T_COL__107"           
"T_COL__107_605","A4"."T_COL__108" "T_COL__108_606","A4"."T_COL__109"           
"T_COL__109_607","A4"."T_COL__110" "T_COL__110_608","A4"."T_COL__111"           
"T_COL__111_609","A4"."T_COL__112" "T_COL__112_610","A4"."T_COL__113"           
"T_COL__113_611","A4"."T_COL__114" "T_COL__114_612","A4"."T_COL__115"           
"T_COL__115_613","A4"."T_COL__116" "T_COL__116_614","A4"."T_COL__117"           
"T_COL__117_615","A4"."T_COL__118" "T_COL__118_616","A4"."T_COL__119"           
"T_COL__119_617","A4"."T_COL__120" "T_COL__120_618","A4"."T_COL__121"           
"T_COL__121_619","A4"."T_COL__122" "T_COL__122_620","A4"."T_COL__123"           
"T_COL__123_621","A4"."T_COL__124" "T_COL__124_622","A4"."T_COL__125"           
"T_COL__125_623","A4"."T_COL__126" "T_COL__126_624","A4"."T_COL__127"           
"T_COL__127_625","A4"."T_COL__128" "T_COL__128_626","A4"."T_COL__129"           
"T_COL__129_627","A4"."T_COL__130" "T_COL__130_628","A4"."T_COL__131"           
"T_COL__131_629","A4"."T_COL__132" "T_COL__132_630","A4"."T_COL__133"           
"T_COL__133_631","A4"."T_COL__134" "T_COL__134_632","A4"."T_COL__135"           
"T_COL__135_633","A4"."T_COL__136" "T_COL__136_634","A4"."T_COL__137"           
"T_COL__137_635","A4"."T_COL__138" "T_COL__138_636","A4"."T_COL__139"           
"T_COL__139_637","A4"."T_COL__140" "T_COL__140_638","A4"."T_COL__141"           
"T_COL__141_639","A4"."T_COL__142" "T_COL__142_640","A4"."T_COL__143"           
"T_COL__143_641","A4"."T_COL__144" "T_COL__144_642","A4"."T_COL__145"           
"T_COL__145_643","A4"."T_COL__146" "T_COL__146_644","A4"."T_COL__147"           
"T_COL__147_645","A4"."T_COL__148" "T_COL__148_646","A4"."T_COL__149"           
"T_COL__149_647","A4"."T_COL__150" "T_COL__150_648","A4"."T_COL__151"           
"T_COL__151_649","A4"."T_COL__152" "T_COL__152_650","A4"."T_COL__153"           
"T_COL__153_651","A4"."T_COL__154" "T_COL__154_652","A4"."T_COL__155"           
"T_COL__155_653","A4"."T_COL__156" "T_COL__156_654","A4"."T_COL__157"           
"T_COL__157_655","A4"."T_COL__158" "T_COL__158_656","A4"."T_COL__159"           
"T_COL__159_657","A4"."T_COL__160" "T_COL__160_658","A4"."T_COL__161"           
"T_COL__161_659","A4"."T_COL__162" "T_COL__162_660","A4"."T_COL__163"           
"T_COL__163_661","A4"."T_COL__164" "T_COL__164_662","A4"."T_COL__165"           
"T_COL__165_663","A4"."T_COL__166" "T_COL__166_664","A4"."T_COL__167"           
"T_COL__167_665","A4"."T_COL__168" "T_COL__168_666","A4"."T_COL__169"           
"T_COL__169_667","A4"."T_COL__170" "T_COL__170_668","A4"."T_COL__171"           
"T_COL__171_669","A4"."T_COL__172" "T_COL__172_670","A4"."T_COL__173"           
"T_COL__173_671","A4"."T_COL__174" "T_COL__174_672","A4"."T_COL__175"           
"T_COL__175_673","A4"."T_COL__176" "T_COL__176_674","A4"."T_COL__177"           
"T_COL__177_675","A4"."T_COL__178" "T_COL__178_676","A4"."T_COL__179"           
"T_COL__179_677","A4"."T_COL__180" "T_COL__180_678","A4"."T_COL__181"           
"T_COL__181_679","A4"."T_COL__182" "T_COL__182_680","A4"."T_COL__183"           
"T_COL__183_681","A4"."T_COL__184" "T_COL__184_682","A4"."T_COL__185"           
"T_COL__185_683","A4"."T_COL__186" "T_COL__186_684","A4"."T_COL__187"           
"T_COL__187_685","A4"."T_COL__188" "T_COL__188_686","A4"."T_COL__189"           
"T_COL__189_687","A4"."T_COL__190" "T_COL__190_688","A4"."T_COL__191"           
"T_COL__191_689","A4"."T_COL__192" "T_COL__192_690","A4"."T_COL__193"           
"T_COL__193_691","A4"."T_COL__194" "T_COL__194_692","A4"."T_COL__195"           
"T_COL__195_693","A4"."T_COL__196" "T_COL__196_694","A4"."T_COL__197"           
"T_COL__197_695","A4"."T_COL__198" "T_COL__198_696","A4"."T_COL__199"           
"T_COL__199_697","A4"."T_COL__200" "T_COL__200_698","A4"."T_COL__201"           
"T_COL__201_699","A4"."T_COL__202" "T_COL__202_700","A4"."T_COL__203"           
"T_COL__203_701","A4"."T_COL__204" "T_COL__204_702","A4"."T_COL__205"           
"T_COL__205_703","A4"."T_COL__206" "T_COL__206_704","A4"."T_COL__207"           
"T_COL__207_705","A4"."T_COL__208" "T_COL__208_706","A4"."T_COL__209"           
"T_COL__209_707","A4"."T_COL__210" "T_COL__210_708","A4"."T_COL__211"           
"T_COL__211_709","A4"."T_COL__212" "T_COL__212_710","A4"."T_COL__213"           
"T_COL__213_711","A4"."T_COL__214" "T_COL__214_712","A4"."T_COL__215"           
"T_COL__215_713","A4"."T_COL__216" "T_COL__216_714","A4"."T_COL__217"           
"T_COL__217_715","A4"."T_COL__218" "T_COL__218_716","A4"."T_COL__219"           
"T_COL__219_717","A4"."T_COL__220" "T_COL__220_718","A4"."T_COL__221"           
"T_COL__221_719","A4"."T_COL__222" "T_COL__222_720","A4"."T_COL__223"           
"T_COL__223_721","A4"."T_COL__224" "T_COL__224_722","A4"."T_COL__225"           
"T_COL__225_723","A4"."T_COL__226" "T_COL__226_724","A4"."T_COL__227"           
"T_COL__227_725","A4"."T_COL__228" "T_COL__228_726","A4"."T_COL__229"           
"T_COL__229_727","A4"."T_COL__230" "T_COL__230_728","A4"."T_COL__231"           
"T_COL__231_729","A4"."T_COL__232" "T_COL__232_730","A4"."T_COL__233"           
"T_COL__233_731","A4"."T_COL__234" "T_COL__234_732","A4"."T_COL__235"           
"T_COL__235_733","A4"."T_COL__236" "T_COL__236_734","A4"."T_COL__237"           
"T_COL__237_735","A4"."T_COL__238" "T_COL__238_736","A4"."T_COL__239"           
"T_COL__239_737","A4"."T_COL__240" "T_COL__240_738","A4"."T_COL__241"           
"T_COL__241_739","A4"."T_COL__242" "T_COL__242_740","A4"."T_COL__243"           
"T_COL__243_741","A4"."T_COL__244" "T_COL__244_742","A4"."T_COL__245"           
"T_COL__245_743","A4"."T_COL__246" "T_COL__246_744","A4"."T_COL__247"           
"T_COL__247_745","A4"."T_COL__248" "T_COL__248_746","A4"."T_COL__249"           
"T_COL__249_747","A4"."T_COL__250" "T_COL__250_748","A4"."T_COL__251"           
"T_COL__251_749","A4"."T_COL__252" "T_COL__252_750","A4"."T_COL__253"           
"T_COL__253_751","A4"."T_COL__254" "T_COL__254_752","A4"."T_COL__255"           
"T_COL__255_753","A4"."T_COL__256" "T_COL__256_754","A4"."T_COL__257"           
"T_COL__257_755","A4"."T_COL__258" "T_COL__258_756","A4"."T_COL__259"           
"T_COL__259_757","A4"."T_COL__260" "T_COL__260_758","A4"."T_COL__261"           
"T_COL__261_759","A4"."T_COL__262" "T_COL__262_760","A4"."T_COL__263"           
"T_COL__263_761","A4"."T_COL__264" "T_COL__264_762","A4"."T_COL__265"           
"T_COL__265_763","A4"."T_COL__266" "T_COL__266_764","A4"."T_COL__267"           
"T_COL__267_765","A4"."T_COL__268" "T_COL__268_766","A4"."T_COL__269"           
"T_COL__269_767","A4"."T_COL__270" "T_COL__270_768","A4"."T_COL__271"           
"T_COL__271_769","A4"."T_COL__272" "T_COL__272_770","A4"."T_COL__273"           
"T_COL__273_771","A4"."T_COL__274" "T_COL__274_772","A4"."T_COL__275"           
"T_COL__275_773","A4"."T_COL__276" "T_COL__276_774","A4"."T_COL__277"           
"T_COL__277_775","A4"."T_COL__278" "T_COL__278_776","A4"."T_COL__279"           
"T_COL__279_777","A4"."T_COL__280" "T_COL__280_778","A4"."T_COL__281"           
"T_COL__281_779","A4"."T_COL__282" "T_COL__282_780","A4"."T_COL__283"           
"T_COL__283_781","A4"."T_COL__284" "T_COL__284_782","A4"."T_COL__285"           
"T_COL__285_783","A4"."T_COL__286" "T_COL__286_784","A4"."T_COL__287"           
"T_COL__287_785","A4"."T_COL__288" "T_COL__288_786","A4"."T_COL__289"           
"T_COL__289_787","A4"."T_COL__290" "T_COL__290_788","A4"."T_COL__291"           
"T_COL__291_789","A4"."T_COL__292" "T_COL__292_790","A4"."T_COL__293"           
"T_COL__293_791","A4"."T_COL__294" "T_COL__294_792","A4"."T_COL__295"           
"T_COL__295_793","A4"."T_COL__296" "T_COL__296_794","A4"."T_COL__297"           
"T_COL__297_795","A4"."T_COL__298" "T_COL__298_796","A4"."T_COL__299"           
"T_COL__299_797","A4"."T_COL__300" "T_COL__300_798","A4"."T_COL__301"           
"T_COL__301_799","A4"."T_COL__302" "T_COL__302_800","A4"."T_COL__303"           
"T_COL__303_801","A4"."T_COL__304" "T_COL__304_802","A4"."T_COL__305"           
"T_COL__305_803","A4"."T_COL__306" "T_COL__306_804","A4"."T_COL__307"           
"T_COL__307_805","A4"."T_COL__308" "T_COL__308_806","A4"."T_COL__309"           
"T_COL__309_807","A4"."T_COL__310" "T_COL__310_808","A4"."T_COL__311"           
"T_COL__311_809","A4"."T_COL__312" "T_COL__312_810","A4"."T_COL__313"           
"T_COL__313_811","A4"."T_COL__314" "T_COL__314_812","A4"."T_COL__315"           
"T_COL__315_813","A4"."T_COL__316" "T_COL__316_814","A4"."T_COL__317"           
"T_COL__317_815","A4"."T_COL__318" "T_COL__318_816","A4"."T_COL__319"           
"T_COL__319_817","A4"."T_COL__320" "T_COL__320_818","A4"."T_COL__321"           
"T_COL__321_819","A4"."T_COL__322" "T_COL__322_820","A4"."T_COL__323"           
"T_COL__323_821","A4"."T_COL__324" "T_COL__324_822","A4"."T_COL__325"           
"T_COL__325_823","A4"."T_COL__326" "T_COL__326_824","A4"."T_COL__327"           
"T_COL__327_825","A4"."T_COL__328" "T_COL__328_826","A4"."T_COL__329"           
"T_COL__329_827","A4"."T_COL__330" "T_COL__330_828","A4"."T_COL__331"           
"T_COL__331_829","A4"."T_COL__332" "T_COL__332_830","A4"."T_COL__333"           
"T_COL__333_831","A4"."T_COL__334" "T_COL__334_832","A4"."T_COL__335"           
"T_COL__335_833","A4"."T_COL__336" "T_COL__336_834","A4"."T_COL__337"           
"T_COL__337_835","A4"."T_COL__338" "T_COL__338_836","A4"."T_COL__339"           
"T_COL__339_837","A4"."T_COL__340" "T_COL__340_838","A4"."T_COL__341"           
"T_COL__341_839","A4"."T_COL__342" "T_COL__342_840","A4"."T_COL__343"           
"T_COL__343_841","A4"."T_COL__344" "T_COL__344_842","A4"."T_COL__345"           
"T_COL__345_843","A4"."T_COL__346" "T_COL__346_844","A4"."T_COL__347"           
"T_COL__347_845","A4"."T_COL__348" "T_COL__348_846","A4"."T_COL__349"           
"T_COL__349_847","A4"."T_COL__350" "T_COL__350_848","A4"."T_COL__351"           
"T_COL__351_849","A4"."T_COL__352" "T_COL__352_850","A4"."T_COL__353"           
"T_COL__353_851","A4"."T_COL__354" "T_COL__354_852","A4"."T_COL__355"           
"T_COL__355_853","A4"."T_COL__356" "T_COL__356_854","A4"."T_COL__357"           
"T_COL__357_855","A4"."T_COL__358" "T_COL__358_856","A4"."T_COL__359"           
"T_COL__359_857","A4"."T_COL__360" "T_COL__360_858","A4"."T_COL__361"           
"T_COL__361_859","A4"."T_COL__362" "T_COL__362_860","A4"."T_COL__363"           
"T_COL__363_861","A4"."T_COL__364" "T_COL__364_862","A4"."T_COL__365"           
"T_COL__365_863","A4"."T_COL__366" "T_COL__366_864","A4"."T_COL__367"           
"T_COL__367_865","A4"."T_COL__368" "T_COL__368_866","A4"."T_COL__369"           
"T_COL__369_867","A4"."T_COL__370" "T_COL__370_868","A4"."T_COL__371"           
"T_COL__371_869","A4"."T_COL__372" "T_COL__372_870","A4"."T_COL__373"           
"T_COL__373_871","A4"."T_COL__374" "T_COL__374_872","A4"."T_COL__375"           
"T_COL__375_873","A4"."T_COL__376" "T_COL__376_874","A4"."T_COL__377"           
"T_COL__377_875","A4"."T_COL__378" "T_COL__378_876","A4"."T_COL__379"           
"T_COL__379_877","A4"."T_COL__380" "T_COL__380_878","A4"."T_COL__381"           
"T_COL__381_879","A4"."T_COL__382" "T_COL__382_880","A4"."T_COL__383"           
"T_COL__383_881","A4"."T_COL__384" "T_COL__384_882","A4"."T_COL__385"           
"T_COL__385_883","A4"."T_COL__386" "T_COL__386_884","A4"."T_COL__387"           
"T_COL__387_885","A4"."T_COL__388" "T_COL__388_886","A4"."T_COL__389"           
"T_COL__389_887","A4"."T_COL__390" "T_COL__390_888","A4"."T_COL__391"           
"T_COL__391_889","A4"."T_COL__392" "T_COL__392_890","A4"."T_COL__393"           
"T_COL__393_891","A4"."T_COL__394" "T_COL__394_892","A4"."T_COL__395"           
"T_COL__395_893","A4"."T_COL__396" "T_COL__396_894","A4"."T_COL__397"           
"T_COL__397_895","A4"."T_COL__398" "T_COL__398_896","A4"."T_COL__399"           
"T_COL__399_897","A4"."T_COL__400" "T_COL__400_898","A4"."T_COL__401"           
"T_COL__401_899","A4"."T_COL__402" "T_COL__402_900","A4"."T_COL__403"           
"T_COL__403_901","A4"."T_COL__404" "T_COL__404_902","A4"."T_COL__405"           
"T_COL__405_903","A4"."T_COL__406" "T_COL__406_904","A4"."T_COL__407"           
"T_COL__407_905","A4"."T_COL__408" "T_COL__408_906","A4"."T_COL__409"           
"T_COL__409_907","A4"."T_COL__410" "T_COL__410_908","A4"."T_COL__411"           
"T_COL__411_909","A4"."T_COL__412" "T_COL__412_910","A4"."T_COL__413"           
"T_COL__413_911","A4"."T_COL__414" "T_COL__414_912","A4"."T_COL__415"           
"T_COL__415_913","A4"."T_COL__416" "T_COL__416_914","A4"."T_COL__417"           
"T_COL__417_915","A4"."T_COL__418" "T_COL__418_916","A4"."T_COL__419"           
"T_COL__419_917","A4"."T_COL__420" "T_COL__420_918","A4"."T_COL__421"           
"T_COL__421_919","A4"."T_COL__422" "T_COL__422_920","A4"."T_COL__423"           
"T_COL__423_921","A4"."T_COL__424" "T_COL__424_922","A4"."T_COL__425"           
"T_COL__425_923","A4"."T_COL__426" "T_COL__426_924","A4"."T_COL__427"           
"T_COL__427_925","A4"."T_COL__428" "T_COL__428_926","A4"."T_COL__429"           
"T_COL__429_927","A4"."T_COL__430" "T_COL__430_928","A4"."T_COL__431"           
"T_COL__431_929","A4"."T_COL__432" "T_COL__432_930","A4"."T_COL__433"           
"T_COL__433_931","A4"."T_COL__434" "T_COL__434_932","A4"."T_COL__435"           
"T_COL__435_933","A4"."T_COL__436" "T_COL__436_934","A4"."T_COL__437"           
"T_COL__437_935","A4"."T_COL__438" "T_COL__438_936","A4"."T_COL__439"           
"T_COL__439_937","A4"."T_COL__440" "T_COL__440_938","A4"."T_COL__441"           
"T_COL__441_939","A4"."T_COL__442" "T_COL__442_940","A4"."T_COL__443"           
"T_COL__443_941","A4"."T_COL__444" "T_COL__444_942","A4"."T_COL__445"           
"T_COL__445_943","A4"."T_COL__446" "T_COL__446_944","A4"."T_COL__447"           
"T_COL__447_945","A4"."T_COL__448" "T_COL__448_946","A4"."T_COL__449"           
"T_COL__449_947","A4"."T_COL__450" "T_COL__450_948","A4"."T_COL__451"           
"T_COL__451_949","A4"."T_COL__452" "T_COL__452_950","A4"."T_COL__453"           
"T_COL__453_951","A4"."T_COL__454" "T_COL__454_952","A4"."T_COL__455"           
"T_COL__455_953","A4"."T_COL__456" "T_COL__456_954","A4"."T_COL__457"           
"T_COL__457_955","A4"."T_COL__458" "T_COL__458_956","A4"."T_COL__459"           
"T_COL__459_957","A4"."T_COL__460" "T_COL__460_958","A4"."T_COL__461"           
"T_COL__461_959","A4"."T_COL__462" "T_COL__462_960","A4"."T_COL__463"           
"T_COL__463_961","A4"."T_COL__464" "T_COL__464_962","A4"."T_COL__465"           
"T_COL__465_963","A4"."T_COL__466" "T_COL__466_964","A4"."T_COL__467"           
"T_COL__467_965","A4"."T_COL__468" "T_COL__468_966","A4"."T_COL__469"           
"T_COL__469_967","A4"."T_COL__470" "T_COL__470_968","A4"."T_COL__471"           
"T_COL__471_969","A4"."T_COL__472" "T_COL__472_970","A4"."T_COL__473"           
"T_COL__473_971","A4"."T_COL__474" "T_COL__474_972","A4"."T_COL__475"           
"T_COL__475_973","A4"."T_COL__476" "T_COL__476_974","A4"."T_COL__477"           
"T_COL__477_975","A4"."T_COL__478" "T_COL__478_976","A4"."T_COL__479"           
"T_COL__479_977","A4"."T_COL__480" "T_COL__480_978","A4"."T_COL__481"           
"T_COL__481_979","A4"."T_COL__482" "T_COL__482_980","A4"."T_COL__483"           
"T_COL__483_981","A4"."T_COL__484" "T_COL__484_982","A4"."T_COL__485"           
"T_COL__485_983","A4"."T_COL__486" "T_COL__486_984","A4"."T_COL__487"           
"T_COL__487_985","A4"."T_COL__488" "T_COL__488_986","A4"."T_COL__489"           
"T_COL__489_987","A4"."T_COL__490" "T_COL__490_988","A4"."T_COL__491"           
"T_COL__491_989","A4"."T_COL__492" "T_COL__492_990","A4"."T_COL__493"           
"T_COL__493_991","A4"."T_COL__494" "T_COL__494_992","A4"."T_COL__495"           
"T_COL__495_993","A4"."T_COL__496" "T_COL__496_994","A4"."T_COL__497"           
"T_COL__497_995","A4"."T_COL__498" "T_COL__498_996","A4"."T_COL__499"           
"T_COL__499_997" FROM "SYS"."ORANGE" "A5","SYS"."MAUVE" "A4" WHERE              
"A5"."Z_COL_001"="A4"."Z_COL_001") "A3","SYS"."YELLOW" "A2" WHERE               
"A3"."Z_COL_001_0"="A2"."Z_COL_001") "A1"                                       
                                                                                

SQL> 
SQL> 
SQL> --********************************************************************************--
SQL> -- sub selecting only one column also fails in Oracle 12c:
SQL> -- SQL Error: ORA-01792: maximum number of columns in a table or view is 1000
SQL> --********************************************************************************--
SQL> 
SQL> select (select 1 from dual where 1 = 2) as exp_column
  2  from ORANGE g
  3    join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  4    join YELLOW p on g.Z_COL_001 = p.Z_COL_001;

no rows selected

SQL> 
SQL> --********************************************************************************--
SQL> -- The same occurs here
SQL> -- Because of the errant expansion the total number of columns expands to just under
SQL> -- the query limit so that even selecting 1 column from causes the error to occur
SQL> --********************************************************************************--
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2  	 m_sql_in    clob :=
  3  			     '
  4  			     select (select 1 from dual where 1 = 2) as exp_column
  5  			     from ORANGE g
  6  			     join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7  			     join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8  			     ';
  9  begin
 10  
 11  	 dbms_utility.expand_sql_text(
 12  	     m_sql_in,
 13  	     :m_sql_out
 14  	 );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out
SELECT  (SELECT 1 "1" FROM "SYS"."DUAL" "A2" WHERE 1=2) "EXP_COLUMN" FROM       
(SELECT "A4"."Z_COL_001_0" "Z_COL_001","A4"."Z_COL_002_1"                       
"Z_COL_002","A4"."Z_COL_003_2" "Z_COL_003","A4"."Z_COL_004_3"                   
"Z_COL_004","A4"."Z_COL_005_4" "Z_COL_005","A4"."Z_COL_006_5"                   
"Z_COL_006","A4"."Z_COL_007_6" "Z_COL_007","A4"."Z_COL_008_7"                   
"Z_COL_008","A4"."Z_COL_009_8" "Z_COL_009","A4"."Z_COL_010_9"                   
"Z_COL_010","A4"."Z_COL_011_10" "Z_COL_011","A4"."Z_COL_012_11"                 
"Z_COL_012","A4"."Z_COL_013_12" "Z_COL_013","A4"."Z_COL_014_13"                 
"Z_COL_014","A4"."Z_COL_015_14" "Z_COL_015","A4"."Z_COL_016_15"                 
"Z_COL_016","A4"."Z_COL_017_16" "Z_COL_017","A4"."Z_COL_018_17"                 
"Z_COL_018","A4"."Z_COL_019_18" "Z_COL_019","A4"."Z_COL_020_19"                 
"Z_COL_020","A4"."Z_COL_021_20" "Z_COL_021","A4"."Z_COL_022_21"                 
"Z_COL_022","A4"."Z_COL_023_22" "Z_COL_023","A4"."Z_COL_024_23"                 
"Z_COL_024","A4"."Z_COL_025_24" "Z_COL_025","A4"."Z_COL_026_25"                 
"Z_COL_026","A4"."Z_COL_027_26" "Z_COL_027","A4"."Z_COL_028_27"                 
"Z_COL_028","A4"."Z_COL_029_28" "Z_COL_029","A4"."Z_COL_030_29"                 
"Z_COL_030","A4"."Z_COL_031_30" "Z_COL_031","A4"."Z_COL_032_31"                 
"Z_COL_032","A4"."Z_COL_033_32" "Z_COL_033","A4"."Z_COL_034_33"                 
"Z_COL_034","A4"."Z_COL_035_34" "Z_COL_035","A4"."Z_COL_036_35"                 
"Z_COL_036","A4"."Z_COL_037_36" "Z_COL_037","A4"."Z_COL_038_37"                 
"Z_COL_038","A4"."Z_COL_039_38" "Z_COL_039","A4"."Z_COL_040_39"                 
"Z_COL_040","A4"."Z_COL_041_40" "Z_COL_041","A4"."Z_COL_042_41"                 
"Z_COL_042","A4"."Z_COL_043_42" "Z_COL_043","A4"."Z_COL_044_43"                 
"Z_COL_044","A4"."Z_COL_045_44" "Z_COL_045","A4"."Z_COL_046_45"                 
"Z_COL_046","A4"."Z_COL_047_46" "Z_COL_047","A4"."Z_COL_048_47"                 
"Z_COL_048","A4"."Z_COL_049_48" "Z_COL_049","A4"."Z_COL_050_49"                 
"Z_COL_050","A4"."Z_COL_051_50" "Z_COL_051","A4"."Z_COL_052_51"                 
"Z_COL_052","A4"."Z_COL_053_52" "Z_COL_053","A4"."Z_COL_054_53"                 
"Z_COL_054","A4"."Z_COL_055_54" "Z_COL_055","A4"."Z_COL_056_55"                 
"Z_COL_056","A4"."Z_COL_057_56" "Z_COL_057","A4"."Z_COL_058_57"                 
"Z_COL_058","A4"."Z_COL_059_58" "Z_COL_059","A4"."Z_COL_060_59"                 
"Z_COL_060","A4"."Z_COL_061_60" "Z_COL_061","A4"."Z_COL_062_61"                 
"Z_COL_062","A4"."Z_COL_063_62" "Z_COL_063","A4"."Z_COL_064_63"                 
"Z_COL_064","A4"."Z_COL_065_64" "Z_COL_065","A4"."Z_COL_066_65"                 
"Z_COL_066","A4"."Z_COL_067_66" "Z_COL_067","A4"."Z_COL_068_67"                 
"Z_COL_068","A4"."Z_COL_069_68" "Z_COL_069","A4"."Z_COL_070_69"                 
"Z_COL_070","A4"."Z_COL_071_70" "Z_COL_071","A4"."Z_COL_072_71"                 
"Z_COL_072","A4"."Z_COL_073_72" "Z_COL_073","A4"."Z_COL_074_73"                 
"Z_COL_074","A4"."Z_COL_075_74" "Z_COL_075","A4"."Z_COL_076_75"                 
"Z_COL_076","A4"."Z_COL_077_76" "Z_COL_077","A4"."Z_COL_078_77"                 
"Z_COL_078","A4"."Z_COL_079_78" "Z_COL_079","A4"."Z_COL_080_79"                 
"Z_COL_080","A4"."Z_COL_081_80" "Z_COL_081","A4"."Z_COL_082_81"                 
"Z_COL_082","A4"."Z_COL_083_82" "Z_COL_083","A4"."Z_COL_084_83"                 
"Z_COL_084","A4"."Z_COL_085_84" "Z_COL_085","A4"."Z_COL_086_85"                 
"Z_COL_086","A4"."Z_COL_087_86" "Z_COL_087","A4"."Z_COL_088_87"                 
"Z_COL_088","A4"."Z_COL_089_88" "Z_COL_089","A4"."Z_COL_090_89"                 
"Z_COL_090","A4"."Z_COL_091_90" "Z_COL_091","A4"."Z_COL_092_91"                 
"Z_COL_092","A4"."Z_COL_093_92" "Z_COL_093","A4"."Z_COL_094_93"                 
"Z_COL_094","A4"."Z_COL_095_94" "Z_COL_095","A4"."Z_COL_096_95"                 
"Z_COL_096","A4"."Z_COL_097_96" "Z_COL_097","A4"."Z_COL_098_97"                 
"Z_COL_098","A4"."Z_COL_099_98" "Z_COL_099","A4"."Z_COL_100_99"                 
"Z_COL_100","A4"."Z_COL_101_100" "Z_COL_101","A4"."Z_COL_102_101"               
"Z_COL_102","A4"."Z_COL_103_102" "Z_COL_103","A4"."Z_COL_104_103"               
"Z_COL_104","A4"."Z_COL_105_104" "Z_COL_105","A4"."Z_COL_106_105"               
"Z_COL_106","A4"."Z_COL_107_106" "Z_COL_107","A4"."Z_COL_108_107"               
"Z_COL_108","A4"."Z_COL_109_108" "Z_COL_109","A4"."Z_COL_110_109"               
"Z_COL_110","A4"."Z_COL_111_110" "Z_COL_111","A4"."Z_COL_112_111"               
"Z_COL_112","A4"."Z_COL_113_112" "Z_COL_113","A4"."Z_COL_114_113"               
"Z_COL_114","A4"."Z_COL_115_114" "Z_COL_115","A4"."Z_COL_116_115"               
"Z_COL_116","A4"."Z_COL_117_116" "Z_COL_117","A4"."Z_COL_118_117"               
"Z_COL_118","A4"."Z_COL_119_118" "Z_COL_119","A4"."Z_COL_120_119"               
"Z_COL_120","A4"."Z_COL_121_120" "Z_COL_121","A4"."Z_COL_122_121"               
"Z_COL_122","A4"."Z_COL_123_122" "Z_COL_123","A4"."Z_COL_124_123"               
"Z_COL_124","A4"."Z_COL_125_124" "Z_COL_125","A4"."Z_COL_126_125"               
"Z_COL_126","A4"."Z_COL_127_126" "Z_COL_127","A4"."Z_COL_128_127"               
"Z_COL_128","A4"."Z_COL_129_128" "Z_COL_129","A4"."Z_COL_130_129"               
"Z_COL_130","A4"."Z_COL_131_130" "Z_COL_131","A4"."Z_COL_132_131"               
"Z_COL_132","A4"."Z_COL_133_132" "Z_COL_133","A4"."Z_COL_134_133"               
"Z_COL_134","A4"."Z_COL_135_134" "Z_COL_135","A4"."Z_COL_136_135"               
"Z_COL_136","A4"."Z_COL_137_136" "Z_COL_137","A4"."Z_COL_138_137"               
"Z_COL_138","A4"."Z_COL_139_138" "Z_COL_139","A4"."Z_COL_140_139"               
"Z_COL_140","A4"."Z_COL_141_140" "Z_COL_141","A4"."Z_COL_142_141"               
"Z_COL_142","A4"."Z_COL_143_142" "Z_COL_143","A4"."Z_COL_144_143"               
"Z_COL_144","A4"."Z_COL_145_144" "Z_COL_145","A4"."Z_COL_146_145"               
"Z_COL_146","A4"."Z_COL_147_146" "Z_COL_147","A4"."Z_COL_148_147"               
"Z_COL_148","A4"."Z_COL_149_148" "Z_COL_149","A4"."Z_COL_150_149"               
"Z_COL_150","A4"."Z_COL_151_150" "Z_COL_151","A4"."Z_COL_152_151"               
"Z_COL_152","A4"."Z_COL_153_152" "Z_COL_153","A4"."Z_COL_154_153"               
"Z_COL_154","A4"."Z_COL_155_154" "Z_COL_155","A4"."Z_COL_156_155"               
"Z_COL_156","A4"."Z_COL_157_156" "Z_COL_157","A4"."Z_COL_158_157"               
"Z_COL_158","A4"."Z_COL_159_158" "Z_COL_159","A4"."Z_COL_160_159"               
"Z_COL_160","A4"."Z_COL_161_160" "Z_COL_161","A4"."Z_COL_162_161"               
"Z_COL_162","A4"."Z_COL_163_162" "Z_COL_163","A4"."Z_COL_164_163"               
"Z_COL_164","A4"."Z_COL_165_164" "Z_COL_165","A4"."Z_COL_166_165"               
"Z_COL_166","A4"."Z_COL_167_166" "Z_COL_167","A4"."Z_COL_168_167"               
"Z_COL_168","A4"."Z_COL_169_168" "Z_COL_169","A4"."Z_COL_170_169"               
"Z_COL_170","A4"."Z_COL_171_170" "Z_COL_171","A4"."Z_COL_172_171"               
"Z_COL_172","A4"."Z_COL_173_172" "Z_COL_173","A4"."Z_COL_174_173"               
"Z_COL_174","A4"."Z_COL_175_174" "Z_COL_175","A4"."Z_COL_176_175"               
"Z_COL_176","A4"."Z_COL_177_176" "Z_COL_177","A4"."Z_COL_178_177"               
"Z_COL_178","A4"."Z_COL_179_178" "Z_COL_179","A4"."Z_COL_180_179"               
"Z_COL_180","A4"."Z_COL_181_180" "Z_COL_181","A4"."Z_COL_182_181"               
"Z_COL_182","A4"."Z_COL_183_182" "Z_COL_183","A4"."Z_COL_184_183"               
"Z_COL_184","A4"."Z_COL_185_184" "Z_COL_185","A4"."Z_COL_186_185"               
"Z_COL_186","A4"."Z_COL_187_186" "Z_COL_187","A4"."Z_COL_188_187"               
"Z_COL_188","A4"."Z_COL_189_188" "Z_COL_189","A4"."Z_COL_190_189"               
"Z_COL_190","A4"."Z_COL_191_190" "Z_COL_191","A4"."Z_COL_192_191"               
"Z_COL_192","A4"."Z_COL_193_192" "Z_COL_193","A4"."Z_COL_194_193"               
"Z_COL_194","A4"."Z_COL_195_194" "Z_COL_195","A4"."Z_COL_196_195"               
"Z_COL_196","A4"."Z_COL_197_196" "Z_COL_197","A4"."Z_COL_198_197"               
"Z_COL_198","A4"."Z_COL_199_198" "Z_COL_199","A4"."Z_COL_200_199"               
"Z_COL_200","A4"."Z_COL_201_200" "Z_COL_201","A4"."Z_COL_202_201"               
"Z_COL_202","A4"."Z_COL_203_202" "Z_COL_203","A4"."Z_COL_204_203"               
"Z_COL_204","A4"."Z_COL_205_204" "Z_COL_205","A4"."Z_COL_206_205"               
"Z_COL_206","A4"."Z_COL_207_206" "Z_COL_207","A4"."Z_COL_208_207"               
"Z_COL_208","A4"."Z_COL_209_208" "Z_COL_209","A4"."Z_COL_210_209"               
"Z_COL_210","A4"."Z_COL_211_210" "Z_COL_211","A4"."Z_COL_212_211"               
"Z_COL_212","A4"."Z_COL_213_212" "Z_COL_213","A4"."Z_COL_214_213"               
"Z_COL_214","A4"."Z_COL_215_214" "Z_COL_215","A4"."Z_COL_216_215"               
"Z_COL_216","A4"."Z_COL_217_216" "Z_COL_217","A4"."Z_COL_218_217"               
"Z_COL_218","A4"."Z_COL_219_218" "Z_COL_219","A4"."Z_COL_220_219"               
"Z_COL_220","A4"."Z_COL_221_220" "Z_COL_221","A4"."Z_COL_222_221"               
"Z_COL_222","A4"."Z_COL_223_222" "Z_COL_223","A4"."Z_COL_224_223"               
"Z_COL_224","A4"."Z_COL_225_224" "Z_COL_225","A4"."Z_COL_226_225"               
"Z_COL_226","A4"."Z_COL_227_226" "Z_COL_227","A4"."Z_COL_228_227"               
"Z_COL_228","A4"."Z_COL_229_228" "Z_COL_229","A4"."Z_COL_230_229"               
"Z_COL_230","A4"."Z_COL_231_230" "Z_COL_231","A4"."Z_COL_232_231"               
"Z_COL_232","A4"."Z_COL_233_232" "Z_COL_233","A4"."Z_COL_234_233"               
"Z_COL_234","A4"."Z_COL_235_234" "Z_COL_235","A4"."Z_COL_236_235"               
"Z_COL_236","A4"."Z_COL_237_236" "Z_COL_237","A4"."Z_COL_238_237"               
"Z_COL_238","A4"."Z_COL_239_238" "Z_COL_239","A4"."Z_COL_240_239"               
"Z_COL_240","A4"."Z_COL_241_240" "Z_COL_241","A4"."Z_COL_242_241"               
"Z_COL_242","A4"."Z_COL_243_242" "Z_COL_243","A4"."Z_COL_244_243"               
"Z_COL_244","A4"."Z_COL_245_244" "Z_COL_245","A4"."Z_COL_246_245"               
"Z_COL_246","A4"."Z_COL_247_246" "Z_COL_247","A4"."Z_COL_248_247"               
"Z_COL_248","A4"."Z_COL_249_248" "Z_COL_249","A4"."Z_COL_250_249"               
"Z_COL_250","A4"."Z_COL_251_250" "Z_COL_251","A4"."Z_COL_252_251"               
"Z_COL_252","A4"."Z_COL_253_252" "Z_COL_253","A4"."Z_COL_254_253"               
"Z_COL_254","A4"."Z_COL_255_254" "Z_COL_255","A4"."Z_COL_256_255"               
"Z_COL_256","A4"."Z_COL_257_256" "Z_COL_257","A4"."Z_COL_258_257"               
"Z_COL_258","A4"."Z_COL_259_258" "Z_COL_259","A4"."Z_COL_260_259"               
"Z_COL_260","A4"."Z_COL_261_260" "Z_COL_261","A4"."Z_COL_262_261"               
"Z_COL_262","A4"."Z_COL_263_262" "Z_COL_263","A4"."Z_COL_264_263"               
"Z_COL_264","A4"."Z_COL_265_264" "Z_COL_265","A4"."Z_COL_266_265"               
"Z_COL_266","A4"."Z_COL_267_266" "Z_COL_267","A4"."Z_COL_268_267"               
"Z_COL_268","A4"."Z_COL_269_268" "Z_COL_269","A4"."Z_COL_270_269"               
"Z_COL_270","A4"."Z_COL_271_270" "Z_COL_271","A4"."Z_COL_272_271"               
"Z_COL_272","A4"."Z_COL_273_272" "Z_COL_273","A4"."Z_COL_274_273"               
"Z_COL_274","A4"."Z_COL_275_274" "Z_COL_275","A4"."Z_COL_276_275"               
"Z_COL_276","A4"."Z_COL_277_276" "Z_COL_277","A4"."Z_COL_278_277"               
"Z_COL_278","A4"."Z_COL_279_278" "Z_COL_279","A4"."Z_COL_280_279"               
"Z_COL_280","A4"."Z_COL_281_280" "Z_COL_281","A4"."Z_COL_282_281"               
"Z_COL_282","A4"."Z_COL_283_282" "Z_COL_283","A4"."Z_COL_284_283"               
"Z_COL_284","A4"."Z_COL_285_284" "Z_COL_285","A4"."Z_COL_286_285"               
"Z_COL_286","A4"."Z_COL_287_286" "Z_COL_287","A4"."Z_COL_288_287"               
"Z_COL_288","A4"."Z_COL_289_288" "Z_COL_289","A4"."Z_COL_290_289"               
"Z_COL_290","A4"."Z_COL_291_290" "Z_COL_291","A4"."Z_COL_292_291"               
"Z_COL_292","A4"."Z_COL_293_292" "Z_COL_293","A4"."Z_COL_294_293"               
"Z_COL_294","A4"."Z_COL_295_294" "Z_COL_295","A4"."Z_COL_296_295"               
"Z_COL_296","A4"."Z_COL_297_296" "Z_COL_297","A4"."Z_COL_298_297"               
"Z_COL_298","A4"."Z_COL_299_298" "Z_COL_299","A4"."Z_COL_300_299"               
"Z_COL_300","A4"."Z_COL_301_300" "Z_COL_301","A4"."Z_COL_302_301"               
"Z_COL_302","A4"."Z_COL_303_302" "Z_COL_303","A4"."Z_COL_304_303"               
"Z_COL_304","A4"."Z_COL_305_304" "Z_COL_305","A4"."Z_COL_306_305"               
"Z_COL_306","A4"."Z_COL_307_306" "Z_COL_307","A4"."Z_COL_308_307"               
"Z_COL_308","A4"."Z_COL_309_308" "Z_COL_309","A4"."Z_COL_310_309"               
"Z_COL_310","A4"."Z_COL_311_310" "Z_COL_311","A4"."Z_COL_312_311"               
"Z_COL_312","A4"."Z_COL_313_312" "Z_COL_313","A4"."Z_COL_314_313"               
"Z_COL_314","A4"."Z_COL_315_314" "Z_COL_315","A4"."Z_COL_316_315"               
"Z_COL_316","A4"."Z_COL_317_316" "Z_COL_317","A4"."Z_COL_318_317"               
"Z_COL_318","A4"."Z_COL_319_318" "Z_COL_319","A4"."Z_COL_320_319"               
"Z_COL_320","A4"."Z_COL_321_320" "Z_COL_321","A4"."Z_COL_322_321"               
"Z_COL_322","A4"."Z_COL_323_322" "Z_COL_323","A4"."Z_COL_324_323"               
"Z_COL_324","A4"."Z_COL_325_324" "Z_COL_325","A4"."Z_COL_326_325"               
"Z_COL_326","A4"."Z_COL_327_326" "Z_COL_327","A4"."Z_COL_328_327"               
"Z_COL_328","A4"."Z_COL_329_328" "Z_COL_329","A4"."Z_COL_330_329"               
"Z_COL_330","A4"."Z_COL_331_330" "Z_COL_331","A4"."Z_COL_332_331"               
"Z_COL_332","A4"."Z_COL_333_332" "Z_COL_333","A4"."Z_COL_334_333"               
"Z_COL_334","A4"."Z_COL_335_334" "Z_COL_335","A4"."Z_COL_336_335"               
"Z_COL_336","A4"."Z_COL_337_336" "Z_COL_337","A4"."Z_COL_338_337"               
"Z_COL_338","A4"."Z_COL_339_338" "Z_COL_339","A4"."Z_COL_340_339"               
"Z_COL_340","A4"."Z_COL_341_340" "Z_COL_341","A4"."Z_COL_342_341"               
"Z_COL_342","A4"."Z_COL_343_342" "Z_COL_343","A4"."Z_COL_344_343"               
"Z_COL_344","A4"."Z_COL_345_344" "Z_COL_345","A4"."Z_COL_346_345"               
"Z_COL_346","A4"."Z_COL_347_346" "Z_COL_347","A4"."Z_COL_348_347"               
"Z_COL_348","A4"."Z_COL_349_348" "Z_COL_349","A4"."Z_COL_350_349"               
"Z_COL_350","A4"."Z_COL_351_350" "Z_COL_351","A4"."Z_COL_352_351"               
"Z_COL_352","A4"."Z_COL_353_352" "Z_COL_353","A4"."Z_COL_354_353"               
"Z_COL_354","A4"."Z_COL_355_354" "Z_COL_355","A4"."Z_COL_356_355"               
"Z_COL_356","A4"."Z_COL_357_356" "Z_COL_357","A4"."Z_COL_358_357"               
"Z_COL_358","A4"."Z_COL_359_358" "Z_COL_359","A4"."Z_COL_360_359"               
"Z_COL_360","A4"."Z_COL_361_360" "Z_COL_361","A4"."Z_COL_362_361"               
"Z_COL_362","A4"."Z_COL_363_362" "Z_COL_363","A4"."Z_COL_364_363"               
"Z_COL_364","A4"."Z_COL_365_364" "Z_COL_365","A4"."Z_COL_366_365"               
"Z_COL_366","A4"."Z_COL_367_366" "Z_COL_367","A4"."Z_COL_368_367"               
"Z_COL_368","A4"."Z_COL_369_368" "Z_COL_369","A4"."Z_COL_370_369"               
"Z_COL_370","A4"."Z_COL_371_370" "Z_COL_371","A4"."Z_COL_372_371"               
"Z_COL_372","A4"."Z_COL_373_372" "Z_COL_373","A4"."Z_COL_374_373"               
"Z_COL_374","A4"."Z_COL_375_374" "Z_COL_375","A4"."Z_COL_376_375"               
"Z_COL_376","A4"."Z_COL_377_376" "Z_COL_377","A4"."Z_COL_378_377"               
"Z_COL_378","A4"."Z_COL_379_378" "Z_COL_379","A4"."Z_COL_380_379"               
"Z_COL_380","A4"."Z_COL_381_380" "Z_COL_381","A4"."Z_COL_382_381"               
"Z_COL_382","A4"."Z_COL_383_382" "Z_COL_383","A4"."Z_COL_384_383"               
"Z_COL_384","A4"."Z_COL_385_384" "Z_COL_385","A4"."Z_COL_386_385"               
"Z_COL_386","A4"."Z_COL_387_386" "Z_COL_387","A4"."Z_COL_388_387"               
"Z_COL_388","A4"."Z_COL_389_388" "Z_COL_389","A4"."Z_COL_390_389"               
"Z_COL_390","A4"."Z_COL_391_390" "Z_COL_391","A4"."Z_COL_392_391"               
"Z_COL_392","A4"."Z_COL_393_392" "Z_COL_393","A4"."Z_COL_394_393"               
"Z_COL_394","A4"."Z_COL_395_394" "Z_COL_395","A4"."Z_COL_396_395"               
"Z_COL_396","A4"."Z_COL_397_396" "Z_COL_397","A4"."Z_COL_398_397"               
"Z_COL_398","A4"."Z_COL_399_398" "Z_COL_399","A4"."Z_COL_400_399"               
"Z_COL_400","A4"."Z_COL_401_400" "Z_COL_401","A4"."Z_COL_402_401"               
"Z_COL_402","A4"."Z_COL_403_402" "Z_COL_403","A4"."Z_COL_404_403"               
"Z_COL_404","A4"."Z_COL_405_404" "Z_COL_405","A4"."Z_COL_406_405"               
"Z_COL_406","A4"."Z_COL_407_406" "Z_COL_407","A4"."Z_COL_408_407"               
"Z_COL_408","A4"."Z_COL_409_408" "Z_COL_409","A4"."Z_COL_410_409"               
"Z_COL_410","A4"."Z_COL_411_410" "Z_COL_411","A4"."Z_COL_412_411"               
"Z_COL_412","A4"."Z_COL_413_412" "Z_COL_413","A4"."Z_COL_414_413"               
"Z_COL_414","A4"."Z_COL_415_414" "Z_COL_415","A4"."Z_COL_416_415"               
"Z_COL_416","A4"."Z_COL_417_416" "Z_COL_417","A4"."Z_COL_418_417"               
"Z_COL_418","A4"."Z_COL_419_418" "Z_COL_419","A4"."Z_COL_420_419"               
"Z_COL_420","A4"."Z_COL_421_420" "Z_COL_421","A4"."Z_COL_422_421"               
"Z_COL_422","A4"."Z_COL_423_422" "Z_COL_423","A4"."Z_COL_424_423"               
"Z_COL_424","A4"."Z_COL_425_424" "Z_COL_425","A4"."Z_COL_426_425"               
"Z_COL_426","A4"."Z_COL_427_426" "Z_COL_427","A4"."Z_COL_428_427"               
"Z_COL_428","A4"."Z_COL_429_428" "Z_COL_429","A4"."Z_COL_430_429"               
"Z_COL_430","A4"."Z_COL_431_430" "Z_COL_431","A4"."Z_COL_432_431"               
"Z_COL_432","A4"."Z_COL_433_432" "Z_COL_433","A4"."Z_COL_434_433"               
"Z_COL_434","A4"."Z_COL_435_434" "Z_COL_435","A4"."Z_COL_436_435"               
"Z_COL_436","A4"."Z_COL_437_436" "Z_COL_437","A4"."Z_COL_438_437"               
"Z_COL_438","A4"."Z_COL_439_438" "Z_COL_439","A4"."Z_COL_440_439"               
"Z_COL_440","A4"."Z_COL_441_440" "Z_COL_441","A4"."Z_COL_442_441"               
"Z_COL_442","A4"."Z_COL_443_442" "Z_COL_443","A4"."Z_COL_444_443"               
"Z_COL_444","A4"."Z_COL_445_444" "Z_COL_445","A4"."Z_COL_446_445"               
"Z_COL_446","A4"."Z_COL_447_446" "Z_COL_447","A4"."Z_COL_448_447"               
"Z_COL_448","A4"."Z_COL_449_448" "Z_COL_449","A4"."Z_COL_450_449"               
"Z_COL_450","A4"."Z_COL_451_450" "Z_COL_451","A4"."Z_COL_452_451"               
"Z_COL_452","A4"."Z_COL_453_452" "Z_COL_453","A4"."Z_COL_454_453"               
"Z_COL_454","A4"."Z_COL_455_454" "Z_COL_455","A4"."Z_COL_456_455"               
"Z_COL_456","A4"."Z_COL_457_456" "Z_COL_457","A4"."Z_COL_458_457"               
"Z_COL_458","A4"."Z_COL_459_458" "Z_COL_459","A4"."Z_COL_460_459"               
"Z_COL_460","A4"."Z_COL_461_460" "Z_COL_461","A4"."Z_COL_462_461"               
"Z_COL_462","A4"."Z_COL_463_462" "Z_COL_463","A4"."Z_COL_464_463"               
"Z_COL_464","A4"."Z_COL_465_464" "Z_COL_465","A4"."Z_COL_466_465"               
"Z_COL_466","A4"."Z_COL_467_466" "Z_COL_467","A4"."Z_COL_468_467"               
"Z_COL_468","A4"."Z_COL_469_468" "Z_COL_469","A4"."Z_COL_470_469"               
"Z_COL_470","A4"."Z_COL_471_470" "Z_COL_471","A4"."Z_COL_472_471"               
"Z_COL_472","A4"."Z_COL_473_472" "Z_COL_473","A4"."Z_COL_474_473"               
"Z_COL_474","A4"."Z_COL_475_474" "Z_COL_475","A4"."Z_COL_476_475"               
"Z_COL_476","A4"."Z_COL_477_476" "Z_COL_477","A4"."Z_COL_478_477"               
"Z_COL_478","A4"."Z_COL_479_478" "Z_COL_479","A4"."Z_COL_480_479"               
"Z_COL_480","A4"."Z_COL_481_480" "Z_COL_481","A4"."Z_COL_482_481"               
"Z_COL_482","A4"."Z_COL_483_482" "Z_COL_483","A4"."Z_COL_484_483"               
"Z_COL_484","A4"."Z_COL_485_484" "Z_COL_485","A4"."Z_COL_486_485"               
"Z_COL_486","A4"."Z_COL_487_486" "Z_COL_487","A4"."Z_COL_488_487"               
"Z_COL_488","A4"."Z_COL_489_488" "Z_COL_489","A4"."Z_COL_490_489"               
"Z_COL_490","A4"."Z_COL_491_490" "Z_COL_491","A4"."Z_COL_492_491"               
"Z_COL_492","A4"."Z_COL_493_492" "Z_COL_493","A4"."Z_COL_494_493"               
"Z_COL_494","A4"."Z_COL_495_494" "Z_COL_495","A4"."Z_COL_496_495"               
"Z_COL_496","A4"."Z_COL_497_496" "Z_COL_497","A4"."Z_COL_498_497"               
"Z_COL_498","A4"."Z_COL_499_498" "Z_COL_499","A4"."Z_COL_001_499"               
"Z_COL_001","A4"."T_COL__002_500" "T_COL__002","A4"."T_COL__003_501"            
"T_COL__003","A4"."T_COL__004_502" "T_COL__004","A4"."T_COL__005_503"           
"T_COL__005","A4"."T_COL__006_504" "T_COL__006","A4"."T_COL__007_505"           
"T_COL__007","A4"."T_COL__008_506" "T_COL__008","A4"."T_COL__009_507"           
"T_COL__009","A4"."T_COL__010_508" "T_COL__010","A4"."T_COL__011_509"           
"T_COL__011","A4"."T_COL__012_510" "T_COL__012","A4"."T_COL__013_511"           
"T_COL__013","A4"."T_COL__014_512" "T_COL__014","A4"."T_COL__015_513"           
"T_COL__015","A4"."T_COL__016_514" "T_COL__016","A4"."T_COL__017_515"           
"T_COL__017","A4"."T_COL__018_516" "T_COL__018","A4"."T_COL__019_517"           
"T_COL__019","A4"."T_COL__020_518" "T_COL__020","A4"."T_COL__021_519"           
"T_COL__021","A4"."T_COL__022_520" "T_COL__022","A4"."T_COL__023_521"           
"T_COL__023","A4"."T_COL__024_522" "T_COL__024","A4"."T_COL__025_523"           
"T_COL__025","A4"."T_COL__026_524" "T_COL__026","A4"."T_COL__027_525"           
"T_COL__027","A4"."T_COL__028_526" "T_COL__028","A4"."T_COL__029_527"           
"T_COL__029","A4"."T_COL__030_528" "T_COL__030","A4"."T_COL__031_529"           
"T_COL__031","A4"."T_COL__032_530" "T_COL__032","A4"."T_COL__033_531"           
"T_COL__033","A4"."T_COL__034_532" "T_COL__034","A4"."T_COL__035_533"           
"T_COL__035","A4"."T_COL__036_534" "T_COL__036","A4"."T_COL__037_535"           
"T_COL__037","A4"."T_COL__038_536" "T_COL__038","A4"."T_COL__039_537"           
"T_COL__039","A4"."T_COL__040_538" "T_COL__040","A4"."T_COL__041_539"           
"T_COL__041","A4"."T_COL__042_540" "T_COL__042","A4"."T_COL__043_541"           
"T_COL__043","A4"."T_COL__044_542" "T_COL__044","A4"."T_COL__045_543"           
"T_COL__045","A4"."T_COL__046_544" "T_COL__046","A4"."T_COL__047_545"           
"T_COL__047","A4"."T_COL__048_546" "T_COL__048","A4"."T_COL__049_547"           
"T_COL__049","A4"."T_COL__050_548" "T_COL__050","A4"."T_COL__051_549"           
"T_COL__051","A4"."T_COL__052_550" "T_COL__052","A4"."T_COL__053_551"           
"T_COL__053","A4"."T_COL__054_552" "T_COL__054","A4"."T_COL__055_553"           
"T_COL__055","A4"."T_COL__056_554" "T_COL__056","A4"."T_COL__057_555"           
"T_COL__057","A4"."T_COL__058_556" "T_COL__058","A4"."T_COL__059_557"           
"T_COL__059","A4"."T_COL__060_558" "T_COL__060","A4"."T_COL__061_559"           
"T_COL__061","A4"."T_COL__062_560" "T_COL__062","A4"."T_COL__063_561"           
"T_COL__063","A4"."T_COL__064_562" "T_COL__064","A4"."T_COL__065_563"           
"T_COL__065","A4"."T_COL__066_564" "T_COL__066","A4"."T_COL__067_565"           
"T_COL__067","A4"."T_COL__068_566" "T_COL__068","A4"."T_COL__069_567"           
"T_COL__069","A4"."T_COL__070_568" "T_COL__070","A4"."T_COL__071_569"           
"T_COL__071","A4"."T_COL__072_570" "T_COL__072","A4"."T_COL__073_571"           
"T_COL__073","A4"."T_COL__074_572" "T_COL__074","A4"."T_COL__075_573"           
"T_COL__075","A4"."T_COL__076_574" "T_COL__076","A4"."T_COL__077_575"           
"T_COL__077","A4"."T_COL__078_576" "T_COL__078","A4"."T_COL__079_577"           
"T_COL__079","A4"."T_COL__080_578" "T_COL__080","A4"."T_COL__081_579"           
"T_COL__081","A4"."T_COL__082_580" "T_COL__082","A4"."T_COL__083_581"           
"T_COL__083","A4"."T_COL__084_582" "T_COL__084","A4"."T_COL__085_583"           
"T_COL__085","A4"."T_COL__086_584" "T_COL__086","A4"."T_COL__087_585"           
"T_COL__087","A4"."T_COL__088_586" "T_COL__088","A4"."T_COL__089_587"           
"T_COL__089","A4"."T_COL__090_588" "T_COL__090","A4"."T_COL__091_589"           
"T_COL__091","A4"."T_COL__092_590" "T_COL__092","A4"."T_COL__093_591"           
"T_COL__093","A4"."T_COL__094_592" "T_COL__094","A4"."T_COL__095_593"           
"T_COL__095","A4"."T_COL__096_594" "T_COL__096","A4"."T_COL__097_595"           
"T_COL__097","A4"."T_COL__098_596" "T_COL__098","A4"."T_COL__099_597"           
"T_COL__099","A4"."T_COL__100_598" "T_COL__100","A4"."T_COL__101_599"           
"T_COL__101","A4"."T_COL__102_600" "T_CO                                        
                                                                                

SQL> 
SQL> 
SQL> --
SQL> -- Selecting only one column from the ANSI join doesn't produce the exaggerated
SQL> -- column list
SQL> --
SQL> 
SQL> set serveroutput on
SQL> set long 20000
SQL> 
SQL> variable m_sql_out clob
SQL> 
SQL> declare
  2  	 m_sql_in    clob :=
  3  			     '
  4  			     select p.P_COLUMN_002
  5  			     from ORANGE g
  6  			     join MAUVE r on g.Z_COL_001 = r.Z_COL_001
  7  			     join YELLOW p on g.Z_COL_001 = p.Z_COL_001
  8  			     ';
  9  begin
 10  
 11  	 dbms_utility.expand_sql_text(
 12  	     m_sql_in,
 13  	     :m_sql_out
 14  	 );
 15  
 16  end;
 17  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out

M_SQL_OUT                                                                       
--------------------------------------------------------------------------------
SELECT "A1"."P_COLUMN_002_3" "P_COLUMN_002" FROM  (SELECT "A3"."Z_COL_001_0"    
"Z_COL_001","A3"."Z_COL_001_1" "Z_COL_001","A2"."Z_COL_001"                     
"Z_COL_001","A2"."P_COLUMN_002" "P_COLUMN_002_3" FROM  (SELECT "A5"."Z_COL_001" 
"Z_COL_001_0","A4"."Z_COL_001" "Z_COL_001_1" FROM "SYS"."ORANGE"                
"A5","SYS"."MAUVE" "A4" WHERE "A5"."Z_COL_001"="A4"."Z_COL_001")                
"A3","SYS"."YELLOW" "A2" WHERE "A3"."Z_COL_001_0"="A2"."Z_COL_001") "A1"        
                                                                                

SQL> 
SQL> 
SQL> 
SQL> declare
  2  	 m_sql_in    clob :=
  3  			     '
  4  			     select p.*
  5  			     from ORANGE g,
  6  				  MAUVE r,
  7  				  YELLOW p
  8  			     where g.Z_COL_001 = p.Z_COL_001
  9  			     and g.Z_COL_001 = r.Z_COL_001
 10  			     ';
 11  begin
 12  
 13  	 dbms_utility.expand_sql_text(
 14  	     m_sql_in,
 15  	     :m_sql_out
 16  	 );
 17  
 18  end;
 19  /

PL/SQL procedure successfully completed.

SQL> 
SQL> column m_sql_out wrap word
SQL> print m_sql_out

M_SQL_OUT                                                                       
--------------------------------------------------------------------------------
SELECT "A1"."Z_COL_001" "Z_COL_001","A1"."P_COLUMN_002" "P_COLUMN_002" FROM     
"SYS"."ORANGE" "A3","SYS"."MAUVE" "A2","SYS"."YELLOW" "A1" WHERE                
"A3"."Z_COL_001"="A1"."Z_COL_001" AND "A3"."Z_COL_001"="A2"."Z_COL_001"         
                                                                                

SQL> 
SQL> 
SQL> drop table ORANGE;

Table dropped.

SQL> 
SQL> 
SQL> drop table MAUVE;

Table dropped.

SQL> 
SQL> 
SQL> drop table YELLOW;

Table dropped.

SQL> 

The workaround only prevents Oracle from throwing the ORA-01792 error, it doesn’t correct the inflated ANSI expansion nor is it supposed to. For now this is all that Oracle support has to offer on the issue. Hopefully this will be investigated and the underlying problem addressed. For now just know that this error can be thrown when the conditions reported here are met, and that there are two ways around it — re-write the query without ANSI joins or turn off the fix for bug 17376322. The first solution eliminates the base problem entirely; the second just masks the issue by refusing to throw the ORA-01792 error. It may be easier in the short run to use the _fix_control workaround until code can be rewritten; since it’s not clear if the underlying ANSI ezpansion problem can affect other aspects of query performance it may be best to ‘bite the bullet’ and re-write ANSI joins that use star expansion or subqueries into ‘old-style’ Oracle joins. But, that’s a decision only you can make.

And that’s what counts.

March 30, 2015

Sound Advice

Filed under: Performance — dfitzjarrell @ 09:33

"There is much worth noticing that often escapes the eye."
- Norton Juster, The Phantom Tollbooth

Oracle has provided views to assist in managing the SGA and PGA settings when you’re not using Automatic Memory Management (AMM) and a view to manage memory_target when you are using AMM. These views were designed to be fairly easy to interpret but it seems that there has been confusion of late in how to actually use the recommendations Oracle is presenting. Let’s fix that.

Starting with 10gR2 Oracle provided both V$SGA_TARGET_ADVICE and V$PGA_TARGET_ADVICE to assist the DBA in sizing the SGA and PGA based on how the database was using memory. The definitions of these views (as of 11.2.0.4) are shown below:


SQL> desc v$sga_target_advice
 Name                                                                     Null?    Type
 ------------------------------------------------------------------------ -------- -------------------------------------------------
 SGA_SIZE                                                                          NUMBER
 SGA_SIZE_FACTOR                                                                   NUMBER
 ESTD_DB_TIME                                                                      NUMBER
 ESTD_DB_TIME_FACTOR                                                               NUMBER
 ESTD_PHYSICAL_READS                                                               NUMBER

SQL> desc v$pga_target_advice
 Name                                                                     Null?    Type
 ------------------------------------------------------------------------ -------- -------------------------------------------------
 PGA_TARGET_FOR_ESTIMATE                                                           NUMBER
 PGA_TARGET_FACTOR                                                                 NUMBER
 ADVICE_STATUS                                                                     VARCHAR2(3)
 BYTES_PROCESSED                                                                   NUMBER
 ESTD_TIME                                                                         NUMBER
 ESTD_EXTRA_BYTES_RW                                                               NUMBER
 ESTD_PGA_CACHE_HIT_PERCENTAGE                                                     NUMBER
 ESTD_OVERALLOC_COUNT                                                              NUMBER

SQL>

Nothing unusual or esoteric here, however it appears that interpreting the provided advice can be confusing. Looking first at the contents of V$SGA_TARGET_ADVICE let’s see what Oracle reports:


SQL> select * From v$sga_target_advice
  2  /

  SGA_SIZE SGA_SIZE_FACTOR ESTD_DB_TIME ESTD_DB_TIME_FACTOR ESTD_PHYSICAL_READS
---------- --------------- ------------ ------------------- -------------------
       520              .5        65793              5.8208             2579079
       780             .75        23911              2.1155             2068005
      1040               1        11303                   1             1134459
      1300            1.25         9162               .8106              970643
      1560             1.5         9098               .8049              970643
      1820            1.75         9058               .8014              970643
      2080               2         9058               .8014              970643

7 rows selected.

SQL>

Based on resource usage since startup this view provides information on SGA memory settings that may improve performance if adopted. The key element in any of these views is the size factor, with a size factor of 1 being the current setting. Looking at the above output it’s possible that physical reads can be reduced a small amount if sga_target is increased from 1040 MB to 1300 MB; any further increase to sga_target will show no improvement. This is proven by the ESTD_PHYSICAL_READS column, the value of which stays constant for an SGA sized at 1300 MB or greater. In addition the ESTD_DB_TIME_FACTOR doesn’t improve much at greater SGA sizes indicating that further increases provide no real benefit. Ideally the goal is to find the setting providing substantial benefit and use it; the problem appears to be ‘where do I stop looking?’ With the above output we stopped looking for improvement at the first entry providing the lowest estimated physical reads. All entries below that provided no additional benefit.

If sga_target and sga_max_size are set diffently (to allow some degree of dynamic SGA management) it may not be necessary to restart the database since sga_target may be able to be set without adjusting sga_max_size. This view may, however, provide an SGA setting that requires both sga_target and sga_max_size be adjusted, and in that case the database will need to be restarted.

In a similar fashion the V$PGA_TARGET_ADVICE view can also be used to ‘fine tune’ overall PGA settings for the database:


SQL> select * From v$pga_target_advice;

PGA_TARGET_FOR_ESTIMATE PGA_TARGET_FACTOR ADV BYTES_PROCESSED  ESTD_TIME ESTD_EXTRA_BYTES_RW ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT
----------------------- ----------------- --- --------------- ---------- ------------------- ----------------------------- --------------------
               73400320              .125 ON       7.4905E+10   37173880          1395450880                            98                   88
              146800640               .25 ON       7.4905E+10   36716537           456747008                            99                    6
              293601280                .5 ON       7.4905E+10   36643991           307845120                           100                    0
              440401920               .75 ON       7.4905E+10   36494007                   0                           100                    0
              587202560                 1 ON       7.4905E+10   36494007                   0                           100                    0
              704643072               1.2 ON       7.4905E+10   36494007                   0                           100                    0
              822083584               1.4 ON       7.4905E+10   36494007                   0                           100                    0
              939524096               1.6 ON       7.4905E+10   36494007                   0                           100                    0
             1056964608               1.8 ON       7.4905E+10   36494007                   0                           100                    0
             1174405120                 2 ON       7.4905E+10   36494007                   0                           100                    0
             1761607680                 3 ON       7.4905E+10   36494007                   0                           100                    0

PGA_TARGET_FOR_ESTIMATE PGA_TARGET_FACTOR ADV BYTES_PROCESSED  ESTD_TIME ESTD_EXTRA_BYTES_RW ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT
----------------------- ----------------- --- --------------- ---------- ------------------- ----------------------------- --------------------
             2348810240                 4 ON       7.4905E+10   36494007                   0                           100                    0
             3523215360                 6 ON       7.4905E+10   36494007                   0                           100                    0
             4697620480                 8 ON       7.4905E+10   36494007                   0                           100                    0

14 rows selected.

SQL>

Again it’s the target factor that identifies the current setting; working toward larger target factors may show improvement in the PGA cache hit percentage which means processes will see more optimized (one-pass) reads. Like the V$SGA_TARGET_ADVICE view the method is to find a setting that provides improvement. In this example the PGA setting is already optimal (the cache hit percentage is 100 and 0 extra bytes will need to be read). Not every database will be so lucky; this view is provided to allow the DBA to make as few changes as possible to achieve improved performance and throughput, eliminating the need for trial and error PGA management. In this case the database will need to be restarted after the parameter values have been changed.

To restate the methodology of using these two views:


1.	Find the row referencing the current setting; this will be the row where the size factor is equal to 1
2.	Scan the data for the entry just before the improvement estimates no longer change; this will be the setting
	Oracle has calculated to provide the most benefit
3.	Implement that setting, restarting the database, if necessary, to effect the change

In a similar fashion when using Automatic Memory Management, by setting memory_target and memory_max_target, the V$MEMORY_TARGET_ADVICE view can be used to tune the overall memory settings. Output from this view looks like this:


SQL> select * From v$memory_target_advice;

MEMORY_SIZE MEMORY_SIZE_FACTOR ESTD_DB_TIME ESTD_DB_TIME_FACTOR    VERSION     CON_ID
----------- ------------------ ------------ ------------------- ---------- ----------
        392                .25       143586              1.0063          0          0
        784                 .5       142687                   1          0          0
       1176                .75       142687                   1          0          0
       1568                  1       142687                   1          0          0
       1960               1.25       142687                   1          0          0
       2352                1.5       142687                   1          0          0
       2744               1.75       142687                   1          0          0
       3136                  2       142687                   1          0          0

8 rows selected.

SQL>

The same methodology is used here, and if memory_max_target is larger than the suggested memory_target value the setting can be changed without restarting the database. Like the SGA settings if memory_max_target needs to also be adjusted this will require a database restart. Note that if you’re using Linux and hugepages using AMM is not supported.

Managing database memory settings doesn’t need to be a gruelling task of ‘try this, see if it works, it doesn’t so try another setting and repeat’. Using the provided memory advisors can make the DBA’s job much easier. Hopefully this has made that task easier, freeing the DBA to address more pressing issues.

Sometimes it’s good to take things under advisement.

March 12, 2015

Extra-cost Option?

Filed under: General,Performance — dfitzjarrell @ 09:14

"Just because you have a choice, it doesn't mean that any of them 'has' to be right."
 Norton Juster, The Phantom Tollbooth 

In an Oracle forum that I frequent a user posted that he found cardinality values to be severely inflated when using an analytic function. This user posted an example that will be used here to demonstrate the problem. It will also be used to demonstrate another issue that can make this problem even more confusing, but the latter issue is one that can easily be fixed.

The example script contains the following code, which includes statements not executed by the user posting the problem (creating a new user to run the example from, using an additional statistics gathering method to verify the method wasn’t part of the cause and modifying the dynamic sampling setting), but which have no effect on the results generated:



connect bing/#############

spool wrong_card_ex.log
select * From v$version;

set echo on linesize 132

create table t1
as
select * From all_objects;

exec dbms_stats.gather_table_stats(user, 'T1')

EXPLAIN PLAN FOR
SELECT object_type
     , object_name
FROM (
	  SELECT object_type
	       , object_name
	  FROM   t1
)
WHERE object_name = 'DUAL';
SELECT * FROM TABLE(dbms_xplan.display);

set autotrace on

select object_type, object_name
from
(select object_type, object_name from t1)
where object_name = 'DUAL';

select object_type, object_name, object_rank
from
(select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
where object_name = 'DUAL';

set autotrace off

connect bing/#############

set echo on linesize 132

alter session set optimizer_dynamic_sampling=11;

EXPLAIN PLAN FOR
SELECT object_type
     , object_name
     , object_rank
FROM (
	  SELECT object_type
	       , object_name
	       , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
	  FROM   t1
)
WHERE object_name = 'DUAL';
SELECT * FROM TABLE(dbms_xplan.display);

set autotrace on

select object_type, object_name
from
(select object_type, object_name from t1)
where object_name = 'DUAL';

select object_type, object_name, object_rank
from
(select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
where object_name = 'DUAL';

set autotrace off

exec dbms_stats.gather_schema_stats(user)

EXPLAIN PLAN FOR
SELECT object_type
     , object_name
FROM (
	  SELECT object_type
	       , object_name
	  FROM   t1
)
WHERE object_name = 'DUAL';
SELECT * FROM TABLE(dbms_xplan.display);

set autotrace on

select object_type, object_name
from
(select object_type, object_name from t1)
where object_name = 'DUAL';

select object_type, object_name, object_rank
from
(select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
where object_name = 'DUAL';

set autotrace off

connect bing/#############

set echo on linesize 132

alter session set optimizer_dynamic_sampling=11;

EXPLAIN PLAN FOR
SELECT object_type
     , object_name
     , object_rank
FROM (
	  SELECT object_type
	       , object_name
	       , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
	  FROM   t1
)
WHERE object_name = 'DUAL';
SELECT * FROM TABLE(dbms_xplan.display);

set autotrace on

select object_type, object_name
from
(select object_type, object_name from t1)
where object_name = 'DUAL';

select object_type, object_name, object_rank
from
(select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
where object_name = 'DUAL';

set autotrace off

spool off

Nothing unusual there, really, other than the second run of the code minus the table creation. That was done to test whether gathering schema stats over gathering table stats made a difference in the cardinality numbers; it did not. Let’s look at a run of this script in an 11.2.0.4 database and see what cardinalities Oracle generates:


BANNER                                                                                                                              
--------------------------------------------------------------------------------                                                    
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production                                                        
PL/SQL Release 11.2.0.4.0 - Production                                                                                              
CORE	11.2.0.4.0	Production                                                                                                          
TNS for 64-bit Windows: Version 11.2.0.4.0 - Production                                                                             
NLSRTL Version 11.2.0.4.0 - Production                                                                                              

SQL> 
SQL> create table t1
  2  as
  3  select * From all_objects;

Table created.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'T1')

PL/SQL procedure successfully completed.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  FROM (
  5  	       SELECT object_type
  6  		    , object_name
  7  	       FROM   t1
  8  )
  9  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 

13 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 


Statistics
----------------------------------------------------------                                                                          
          1  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        983  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 


Statistics
----------------------------------------------------------                                                                          
          1  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        982  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> connect bing/##########
Connected.
SQL> 
SQL> set echo on linesize 132
SQL> 
SQL> alter session set optimizer_dynamic_sampling=11;

Session altered.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  	  , object_rank
  5  FROM (
  6  	       SELECT object_type
  7  		    , object_name
  8  		    , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
  9  	       FROM   t1
 10  )
 11  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

19 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
         12  recursive calls                                                                                                        
          0  db block gets                                                                                                          
       1788  consistent gets                                                                                                        
          1  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 

So far, so good, as the cardinality accurately reflects the actual number of rows for DUAL in the ALL_OBJECTS view. Let’s add the ROW_NUMBER() analytic function and see what changes:


SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          7  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        989  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off

Interestingly (to put it mildly) the cardinality has jumped to over 30,000 times its original value. Maybe it’s the way the stats were gathered; another run is made, this time gathering stats for the entire schema (fortunately it contains only this one table):


SQL> 
SQL> exec dbms_stats.gather_schema_stats(user)

PL/SQL procedure successfully completed.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  FROM (
  5  	       SELECT object_type
  6  		    , object_name
  7  	       FROM   t1
  8  )
  9  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

17 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        983  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        982  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> connect bing/##########
Connected.
SQL> 
SQL> set echo on linesize 132
SQL> 
SQL> alter session set optimizer_dynamic_sampling=11;

Session altered.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  	  , object_rank
  5  FROM (
  6  	       SELECT object_type
  7  		    , object_name
  8  		    , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
  9  	       FROM   t1
 10  )
 11  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

19 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     2 |    72 |   274   (1)| 00:00:04 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     2 |    72 |   274   (1)| 00:00:04 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        983  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|*  1 |  VIEW               |      | 68395 |  2738K|       |  1042   (1)| 00:00:13 |                                                
|   2 |   WINDOW SORT       |      | 68395 |  2938K|  3784K|  1042   (1)| 00:00:13 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 68395 |  2938K|       |   274   (1)| 00:00:04 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        982  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> spool off

In both attempts (gathering table stats and gathering schema stats) the dynamic sampling setting was changed from 2 (the default for this database) to 11, and both autotrace and dbms_xplan were used to generate the execution plans. To clear out the environment set by autotrace the user was logged in again before running any SQL statements. No change to the results was noticed (meaning that the generated plan didn’t change using one method over the other) so autotrace had no ‘adverse’ affect on the outcome. Oracle has recently proclaimed this as a bug:


Bug 20591362 - WRONG CARDINALITY WHEN ANALYTICS FUNCTION IS USED

which can be found on MOS. In a nutshell the CBO ignores the selectivity of the WHERE clause when an analytic fuunction is introduced into a query and, as a result, computes the incorrect cardinality.

On a side note if your 11.2.0.x installation does not include Oracle JVM you can run afoul of even stranger numbers:


BANNER                                                                                                                              
--------------------------------------------------------------------------------                                                    
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production                                                        
PL/SQL Release 11.2.0.4.0 - Production                                                                                              
CORE	11.2.0.4.0	Production                                                                                                          
TNS for 64-bit Windows: Version 11.2.0.4.0 - Production                                                                             
NLSRTL Version 11.2.0.4.0 - Production                                                                                              

SQL> 
SQL> create table t1
  2  as
  3  select * From all_objects;

Table created.

SQL> 
SQL> exec dbms_stats.gather_table_stats(user, 'T1')

PL/SQL procedure successfully completed.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  FROM (
  5  	       SELECT object_type
  6  		    , object_name
  7  	       FROM   t1
  8  )
  9  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 

13 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 


Statistics
----------------------------------------------------------                                                                          
          1  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        191  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 


Statistics
----------------------------------------------------------                                                                          
          1  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        190  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> connect bing/##########
Connected.
SQL> 
SQL> set echo on linesize 132
SQL> 
SQL> alter session set optimizer_dynamic_sampling=11;

Session altered.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  	  , object_rank
  5  FROM (
  6  	       SELECT object_type
  7  		    , object_name
  8  		    , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
  9  	       FROM   t1
 10  )
 11  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

19 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
         11  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        385  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          7  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        196  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> exec dbms_stats.gather_schema_stats(user)

PL/SQL procedure successfully completed.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  FROM (
  5  	       SELECT object_type
  6  		    , object_name
  7  	       FROM   t1
  8  )
  9  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

17 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        191  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        190  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        499  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> connect bing/##########
Connected.
SQL> 
SQL> set echo on linesize 132
SQL> 
SQL> alter session set optimizer_dynamic_sampling=11;

Session altered.

SQL> 
SQL> EXPLAIN PLAN FOR
  2  SELECT object_type
  3  	  , object_name
  4  	  , object_rank
  5  FROM (
  6  	       SELECT object_type
  7  		    , object_name
  8  		    , ROW_NUMBER() OVER (PARTITION BY object_type ORDER BY created) object_rank
  9  	       FROM   t1
 10  )
 11  WHERE object_name = 'DUAL';

Explained.

SQL> SELECT * FROM TABLE(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    

PLAN_TABLE_OUTPUT                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            

19 rows selected.

SQL> 
SQL> set autotrace on
SQL> 
SQL> select object_type, object_name
  2  from
  3  (select object_type, object_name from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                                                                                                     
------------------- ------------------------------                                                                                  
TABLE               DUAL                                                                                                            
SYNONYM             DUAL                                                                                                            


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 3617692013                                                                                                         
                                                                                                                                    
--------------------------------------------------------------------------                                                          
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                          
--------------------------------------------------------------------------                                                          
|   0 | SELECT STATEMENT  |      |     1 |    26 |    56   (0)| 00:00:01 |                                                          
|*  1 |  TABLE ACCESS FULL| T1   |     1 |    26 |    56   (0)| 00:00:01 |                                                          
--------------------------------------------------------------------------                                                          
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        191  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        674  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          0  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> select object_type, object_name, object_rank
  2  from
  3  (select object_type, object_name, row_number() over (partition by object_type order by created) object_rank from t1)
  4  where object_name = 'DUAL';

OBJECT_TYPE         OBJECT_NAME                    OBJECT_RANK                                                                      
------------------- ------------------------------ -----------                                                                      
SYNONYM             DUAL                                     1                                                                      
TABLE               DUAL                                    43                                                                      


Execution Plan
----------------------------------------------------------                                                                          
Plan hash value: 2273146475                                                                                                         
                                                                                                                                    
------------------------------------------------------------------------------------                                                
| Id  | Operation           | Name | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                
------------------------------------------------------------------------------------                                                
|   0 | SELECT STATEMENT    |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|*  1 |  VIEW               |      | 14281 |   571K|       |   190   (2)| 00:00:03 |                                                
|   2 |   WINDOW SORT       |      | 14281 |   474K|   632K|   190   (2)| 00:00:03 |                                                
|   3 |    TABLE ACCESS FULL| T1   | 14281 |   474K|       |    56   (0)| 00:00:01 |                                                
------------------------------------------------------------------------------------                                                
                                                                                                                                    
Predicate Information (identified by operation id):                                                                                 
---------------------------------------------------                                                                                 
                                                                                                                                    
   1 - filter("OBJECT_NAME"='DUAL')                                                                                                 
                                                                                                                                    
Note                                                                                                                                
-----                                                                                                                               
   - dynamic sampling used for this statement (level=11)                                                                            


Statistics
----------------------------------------------------------                                                                          
          0  recursive calls                                                                                                        
          0  db block gets                                                                                                          
        190  consistent gets                                                                                                        
          0  physical reads                                                                                                         
          0  redo size                                                                                                              
        753  bytes sent via SQL*Net to client                                                                                       
        500  bytes received via SQL*Net from client                                                                                 
          2  SQL*Net roundtrips to/from client                                                                                      
          1  sorts (memory)                                                                                                         
          0  sorts (disk)                                                                                                           
          2  rows processed                                                                                                         

SQL> 
SQL> set autotrace off
SQL> 
SQL> spool off

Notice that the number of rows reported in the execution plans for the non-analytic query are half of what they are supposed to be, and the inflated number of rows is roughly one-fourth of the previously reported value. In the absence of the JVM the data dictionary is ‘short’ around 50,000 rows which can skew the selectivity down to around 1 for the example query. Installing the JVM, using dbca, fixes that issue.

Until this bug is fixed by a one-off patch pay close attention to the row estimates produced for queries using analytic functions; at the least this little ‘inconvenience’ could make troubleshooting performance issues difficult. You may need to eliminate the analytic function to reveal a better estimate of the number of rows returned so you’re not chasing an issue that doesn’t really exist.

Numbers never lie, until they do.

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 1,022 other followers