Help tuning a decryption function

I have the following function which decrypts credit card number and is running extremely slowly. The problem is related to the cal to an external table 'select enckey into p_key2 from ops_sec'. Looking at the explain plan, this gets executed for each row of data and is causing the slow-down. This 'table' actually just contains one half of the encryption key and is just one row with a 128 bit key.
When I run this SQL:
select get_dec_val(op_key)
from op
where substr(get_dec_val(op_key),6,9)='0344'
I may be misinterpreting the explain plan but it appears that for every one execution of this statement:
select a.op_ekey, b.op_enc_t
into p_key1, p_in
from op_ek a, op_es b
where a.op_key=b.op_key
and a.op_key=op_key;
This statement get executed 8000 times:
select enckey into p_key2 from ops_sec;
How do I adjust this code so that this only get executed once?
create or replace function get_dec_val
-- p_in in raw,
op_key in number
return varchar2
is
l_ret varchar2 (2000);
l_dec_val raw (2000);
p_key1 raw (2000);
p_key2 raw (2000);
p_in raw (2000);
l_mod number := dbms_crypto.ENCRYPT_AES256
+ dbms_crypto.CHAIN_CBC
+ dbms_crypto.PAD_PKCS5;
begin
select a.op_ekey, b.op_enc_t
into p_key1, p_in
from op_ek a, op_es b
where a.op_key=b.op_key
and a.op_key=op_key;
select enckey into p_key2 from ops_sec; -- external table
l_dec_val := dbms_crypto.decrypt
p_in,
l_mod,
p_key2||p_key1
l_ret:= UTL_I18N.RAW_TO_CHAR
(l_dec_val, 'AL32UTF8');
return l_ret;
end;

From the outputs I may say if you really need to access this file from the operating system there will be an alternative cost.
conn hr/hr
set autotrace traceonly statistics
alter session set max_dump_file_size=unlimited;
ALTER session SET timed_statistics = true;
alter session set STATISTICS_LEVEL = ALL ;
alter session set tracefile_identifier = external ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT get_from_ext_tab FROM tst_tab ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';
conn hr/hr
set autotrace traceonly statistics
alter session set max_dump_file_size=unlimited;
ALTER session SET timed_statistics = true;
alter session set STATISTICS_LEVEL = ALL ;
alter session set tracefile_identifier = normal ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT get_from_heap_tab FROM tst_tab ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';
conn hr/hr
set autotrace traceonly statistics
alter session set max_dump_file_size=unlimited;
ALTER session SET timed_statistics = true;
alter session set STATISTICS_LEVEL = ALL ;
alter session set tracefile_identifier = package ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT get_from_pkg FROM tst_tab ;
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF';
conn hr/hr
tkprof xe_ora_9072_package.trc xe_ora_9072_package.txt sys=yes waits=yes sort=execpu
tkprof xe_ora_11892_normal.trc xe_ora_11892_normal.txt sys=yes waits=yes sort=execpu
tkprof xe_ora_7656_external.trc xe_ora_7656_external.txt sys=yes waits=yes sort=execpuand below is the tkprof report of the external table test's trace for details of the cost -
TKPROF: Release 10.2.0.1.0 - Production on Paz Oca 27 21:44:10 2008
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Trace file: xe_ora_7656_external.trc
Sort options: execpu 
count    = number of times OCI procedure was executed
cpu      = cpu time in seconds executing
elapsed  = elapsed time in seconds executing
disk     = number of physical reads of buffers from disk
query    = number of buffers gotten for consistent read
current  = number of buffers gotten in current mode (usually for update)
rows     = number of rows processed by the fetch or execute call
SELECT PATH, READ, WRITE
FROM
SYS.LOADER_DIR_OBJS WHERE NAME = :1
call     count       cpu    elapsed       disk      query    current        rows
Parse     1000      0.03       0.01          0          0          0           0
Execute   1000      0.06       0.06          0          0          0           0
Fetch     2000      0.76       0.93          0      32000          0        1000
total     4000      0.85       1.01          0      32000          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33     (recursive depth: 2)
Rows     Row Source Operation
      1  VIEW  LOADER_DIR_OBJS (cr=32 pr=0 pw=0 time=1060 us)
      1   UNION-ALL  (cr=32 pr=0 pw=0 time=1038 us)
      0    NESTED LOOPS  (cr=15 pr=0 pw=0 time=353 us)
      5     TABLE ACCESS FULL DIR$ (cr=3 pr=0 pw=0 time=71 us)
      0     TABLE ACCESS BY INDEX ROWID OBJ$ (cr=12 pr=0 pw=0 time=225 us)
      5      INDEX UNIQUE SCAN I_OBJ1 (cr=7 pr=0 pw=0 time=92 us)(object id 36)
      0      FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=37 us)
      1    HASH GROUP BY (cr=17 pr=0 pw=0 time=615 us)
      2     FILTER  (cr=17 pr=0 pw=0 time=371 us)
      2      NESTED LOOPS  (cr=17 pr=0 pw=0 time=325 us)
      1       NESTED LOOPS  (cr=15 pr=0 pw=0 time=235 us)
      5        TABLE ACCESS FULL DIR$ (cr=3 pr=0 pw=0 time=40 us)
      1        TABLE ACCESS BY INDEX ROWID OBJ$ (cr=12 pr=0 pw=0 time=148 us)
      5         INDEX UNIQUE SCAN I_OBJ1 (cr=7 pr=0 pw=0 time=66 us)(object id 36)
      2       INDEX RANGE SCAN I_OBJAUTH1 (cr=2 pr=0 pw=0 time=61 us)(object id 103)
      1        FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=13 us)
      0      FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=18 us)
SELECT par_type, param_clob, param_blob
from
external_tab$ where obj#=:1
call     count       cpu    elapsed       disk      query    current        rows
Parse     1000      0.00       0.01          0          0          0           0
Execute   1000      0.03       0.03          0          0          0           0
Fetch     1000      0.01       0.03          0       2000          0        1000
total     3000      0.04       0.08          0       2000          0        1000
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS   (recursive depth: 2)
Rows     Row Source Operation
      1  TABLE ACCESS BY INDEX ROWID EXTERNAL_TAB$ (cr=2 pr=0 pw=0 time=47 us)
      1   INDEX UNIQUE SCAN I_EXTERNAL_TAB1$ (cr=1 pr=0 pw=0 time=20 us)(object id 512)
SELECT SESSIONTIMEZONE, LENGTH(SESSIONTIMEZONE)
FROM
DUAL
call     count       cpu    elapsed       disk      query    current        rows
Parse     1000      0.03       0.01          0          0          0           0
Execute   1000      0.01       0.02          0          0          0           0
Fetch     1000      0.00       0.02          0          0          0        1000
total     3000      0.04       0.06          0          0          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33     (recursive depth: 2)
Rows     Row Source Operation
      1  FAST DUAL  (cr=0 pr=0 pw=0 time=12 us)
SELECT DBTIMEZONE, LENGTH(DBTIMEZONE)
FROM
DUAL
call     count       cpu    elapsed       disk      query    current        rows
Parse     1000      0.04       0.01          0          0          0           0
Execute   1000      0.01       0.01          0          0          0           0
Fetch     1000      0.03       0.01          0          0          0        1000
total     3000      0.09       0.04          0          0          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33     (recursive depth: 2)
Rows     Row Source Operation
      1  FAST DUAL  (cr=0 pr=0 pw=0 time=13 us)
SELECT ENCKEY
FROM
EXT_TST_TAB
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute   1000      0.01       0.03          0          0          0           0
Fetch     1000      5.48       5.79          0      18006          0        1000
total     2001      5.50       5.82          0      18006          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33     (recursive depth: 1)
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8'
call     count       cpu    elapsed       disk      query    current        rows
Parse        0      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        0      0.00       0.00          0          0          0           0
total        1      0.00       0.00          0          0          0           0
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33 
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       1        0.00          0.00
  SQL*Net message from client                     1        0.00          0.00
SELECT get_from_ext_tab
FROM
tst_tab
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch       68      0.48       0.44          0       6071          0        1000
total       70      0.48       0.44          0       6071          0        1000
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33 
Rows     Row Source Operation
   1000  TABLE ACCESS FULL TST_TAB (cr=71 pr=0 pw=0 time=5437 us)
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                      68        0.00          0.00
  SQL*Net message from client                    68        0.00          0.01
select metadata
from
kopm$  where name='DB_FDO'
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        1      0.00       0.00          0          2          0           1
total        3      0.00       0.00          0          2          0           1
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS   (recursive depth: 2)
Rows     Row Source Operation
      1  TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=45 us)
      1   INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=20 us)(object id 365)
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT OFF'
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        0      0.00       0.00          0          0          0           0
total        2      0.00       0.00          0          0          0           0
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 33 
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse        2      0.00       0.00          0          0          0           0
Execute      3      0.00       0.00          0          0          0           0
Fetch       68      0.48       0.44          0       6071          0        1000
total       73      0.48       0.44          0       6071          0        1000
Misses in library cache during parse: 0
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                      71        0.00          0.00
  SQL*Net message from client                    71        0.00          0.01
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse     4002      0.10       0.07          0          0          0           0
Execute   5001      0.14       0.16          0          0          0           0
Fetch     6001      6.29       6.79          0      52008          0        5001
total    15004      6.54       7.03          0      52008          0        5001
Misses in library cache during parse: 0
3004  user  SQL statements in session.
1001  internal SQL statements in session.
4005  SQL statements in session.
Trace file: xe_ora_7656_external.trc
Trace file compatibility: 10.01.00
Sort options: execpu 
       3  sessions in tracefile.
    6008  user  SQL statements in trace file.
    2002  internal SQL statements in trace file.
    4005  SQL statements in trace file.
       9  unique SQL statements in trace file.
   52269  lines in trace file.
       7  elapsed seconds in trace file.Also you may easily prepare another simple test case for utl_file and compare its results and decide for your case.
Best regards.

Similar Messages

  • The Encrypt and Decrypt functions.

    All,
    I need to use the Encrypt and Decrypt functions for our password filed in a table.
    The procedures need to pass in an input_string (string to be en/decrypted) and a key_string (en/decryption key string). What is the key_string? Where can I get it from? or How can I generate it?
    Could someone please give some examples on how to use those functions?
    Thanks in advance!

    This may help you, works with 8.1.7 upwards :
    We used this approach when I worked on a project in Holland. We encrypted customers' names and addresses. Note : the value to be encrypted had to be a multiple of 8 characters in length so we always rpad'd values upto a multiple of 8 say 32 and rtrim'd following decryption. W were using 8.1.7. at the time and I am unsure if this requirement still exists. Note : the encryption key was actually held in a package which was wrapped and in a schema with password only known to few.
    set serverout on size 1000000
    declare
       input_string_c     varchar2(16) := '1234567812345678'; -- must be multiple of 8 bytes long
       key_string_c       varchar2(57) := 'abcdefghijklmnop'; -- the key needs to be at leat 8 bytes long
       encrypted_string_c varchar2(2048);
       decrypted_string_c varchar2(2048);
    begin
       dbms_obfuscation_toolkit.desencrypt (input_string     => input_string_c,
                                            key_string       => key_string_c,
                                            encrypted_string => encrypted_string_c) ;
       dbms_obfuscation_toolkit.desdecrypt (input_string     => encrypted_string_c,
                                         key_string       =>  key_string_c,
                                   decrypted_string => decrypted_string_c);
       dbms_output.put_line('encrypted string = >'||encrypted_string_c||'<');
       dbms_output.put_line('decrypted string = >'||decrypted_string_c||'<');
    end;
    /HTH
    AMM

  • Need some help with a remove function

    Design and code a program that will maintain a list of product names. Use a String type to represent the product name and an array of strings to implement the list. Your program must implement the following methods:
    Add a product to the list
    Remove a product from the list
    Display then entire list
    Find out if a particular product is on the list.
    You need to create a command command loop with a menu() function. The program must continue asking for input until the user stops.
    This is the assignment and this is what I have so far. I need some help writing the remove function.
    Thanks
    * Title: SimpleSearchableList.java
    * Description: this example will show a reasonably efficient and
    * simple algorithm for rearranging the value in an array
    * in ascending order.
    public class SimpleSearchableList {
         private static String[] List = new String[25]; //These variables (field variables)
         private static int Size; //are common to the entire class, but unavailable
         //except to the methods of the class...
         public static void main(String[] args)
              String Cmd;
              for(;;) {
                   Menu();
                   System.out.print("Command: ");
                   Cmd = SimpleIO.inputString();
                   if(Cmd.equals("Quit"))
                        break;
                   else if(Cmd.equals("Fill"))
                        FillList();
                   else if(Cmd.equals("Search"))
                        SearchList();
                   else if(Cmd.equals("Show"))
                        ShowList();
                   else if(Cmd.equals("Remove"))
                        Remove();
         //Tells you what you can do...
         public static void Menu()
              System.out.println("Choices..................................");
              System.out.println("\tFill to Enter Product");
              System.out.println("\tShow to Show Products");
              System.out.println("\tSearch to Search for Product");
              System.out.println("\tRemove a Product");
              System.out.println("\tQuit");
              System.out.println(".........................................");
         //This method will allow the user to fill an array with values...
         public static void FillList()
              int Count;
              System.out.println("Type Stop to Stop");
              for(Count = 0 ; Count < List.length ; Count++)
                   System.out.print("Enter Product: ");
                   List[Count] = SimpleIO.inputString();
                   if(List[Count].equals("Stop"))
                        break;
              Size = Count;
         //This method will rearrange the values in the array so that
         // go from smallest to largest (ascending) order...
         public static void SearchList()
              String KeyValue;
              boolean NotFoundFlag;
              int Z;
              System.out.println("Enter Product Names Below, Stop To Quit");
              while(true)
                   System.out.print("Enter: ");
                   KeyValue = SimpleIO.inputString();
                   if(KeyValue.equals("Stop")) //Note the use of a method for testing
                        break; // for equality...
                   NotFoundFlag = true; //We'll assume the negative
                   for(Z = 0 ; Z < Size ; Z++)
                        if(List[Z].equals(KeyValue)) {
                             NotFoundFlag = false; //If we fine the name, we'll reset the flag
              System.out.println(List[Z] + " was found");
                   if(NotFoundFlag)
                        System.out.println(KeyValue + " was not found");     
         //This method will display the contents of the array...
         public static void ShowList()
              int Z;
              for(Z = 0 ; Z < Size ; Z++)
                   System.out.println("Product " + (Z+1) + " = " + List[Z]);
         public static void Remove()
    }

    I need help removing a product from the arrayYes. So what's your problem?
    "Doctor, I need help."
    "What's wrong?"
    "I need help!"
    Great.
    By the way, you can't remove anything from an array. You'll have to copy the remaining stuff into a new one, or maybe maintain a list of "empty" slots. Or null the slots and handle that. The first way will be the easiest though.

  • Help needed with printf function!!!!

    public class Try
    {public static void main (String[] args)
    {int a;
    String b;
    a = 000002;
    b = "JSmith";
    System.out.printf(b + "%d", a);
    }}I need a help with the printf function.
    The result of this small excercise that I just made is:
    Jsmith2
    How do I make it so that the zeros is also displayed? (using the printf)
    I want it to look like this: Jsmith000002
    Thank you in advance

    TrySystem.out.printf(b + "%06d", a);(I don't have a compiler here so I haven't tested this).
    The "6" is the width - the minimum number of characters that will be
    printed and the "0" (it's a zero) is a flag indicating that the output should
    be padded with zeros.
    You should also note that the value of a is two. It doesn't matter whether
    you say a=2; or a=0002; - a is still just plain two.

  • Help in using listagg function for more than 8000 char.

    Hi Friends,
    Need you urgent help in using listagg function for more than 8000 char.
    I did the below sample SQL and in "e_orig" and "d_orig" for upto 4000 char it is working fine but I have to use it for more than 8000 char. and it is giving error,
    I checked the listagg function is having limitation of 4000 char.
    I tried but I am unable to achive this. Can someone provide me a sample example to achive this
    select d.dname,d.loc,e.hiredate
    ,listagg(e.ename,',' ) within group (order by e.deptno) over (partition by e.deptno) as e_orig
    ,listagg(e.ename, ',') within group (order by e.sal) over (partition by e.deptno) as d_orig
    from emp e, dept d
    where e.deptno=d.deptno;[ This is my first post, I gone through the guideline for posting a post , and try to go according to that ( I have not pasted here create table and insert as I have used basic table emp, dept for example), please let me know if still I should give this, I will take care from my next post ]
    Thanks in advance

    Interesting, I didn't know you could do that, but...
    BluShadow wrote:
    You could write some PL/SQL code that does it all for you, but that would involve loops and would be slow.Well, objects are written in PL/SQL aren't they? And presumably there'll be implicit looping too? So it's not at all obvious that this method will be faster than doing the joining in PL/SQL in memory. The only way to find out is to benchmark them - so I have done that.
    I noticed that OP's ref cursor actually only ever retrieves a single record for a bound department number, so I decided the best thing would be to test using a procedure that passes an output string back. I selected all (109) employees and put spaces in to ensure above 4000 characters. I also noticed that as he is using PL/SQL he probably can use a VARCHAR2 type, but just not ListAgg in the query, so I wrote short procedures as follows:
    SimpleAggChr     - bulk collect and array processing, VARCHAR2 output
    ClobAggPrc     - the custom aggregation method, CLOB output
    SimpleAggClob     - bulk collect and array processing, CLOB output
    I then wrote a driving script that calls them in the order above and times each call (I like benchmarking so I have my own timing object to make it easy). I then print the lengths for checking, and my object writes the timings to my output table. Running a few times I got varying results, but generally it looks like there isn't a lot to choose between them for performance.
    Here's the procedure code:
    CREATE OR REPLACE TYPE char100_list_type AS TABLE OF VARCHAR2(100)
    CREATE OR REPLACE PROCEDURE SimpleAggChr (x_out OUT VARCHAR2) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggChr;
    CREATE OR REPLACE PROCEDURE SimpleAggClob (x_out OUT CLOB) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggClob;
    SHO ERR
    PROMPT ClobAggPrc
    CREATE OR REPLACE PROCEDURE ClobAggPrc (x_out OUT CLOB) IS
    BEGIN
      SELECT clobagg(first_name || '                                        ' || last_name || ',')
        INTO x_out
        FROM employees
       ORDER BY salary;
    END ClobAggPrc;
    SHO ERRand the driving script:
    SET SERVEROUTPUT ON
    SET TIMING ON
    DECLARE
      l_enames_c1     CLOB;
      l_enames_c2     CLOB;
      l_enames_v     VARCHAR2(32767);
      l_timer     timer_set_type := timer_set_type ('Aggregation');
    BEGIN
      Utils.g_id := 'Aggregation';
      SimpleAggChr (l_enames_v);
      l_timer.Increment_Time ('SimpleAggChr');
      ClobAggPrc (l_enames_c1);
      l_timer.Increment_Time ('ClobAggPrc');
      SimpleAggClob (l_enames_c2);
      l_timer.Increment_Time ('SimpleAggClob');
      DBMS_Output.Put_Line ('SimpleAggChr returned string of length ' || Length (l_enames_v));
      DBMS_Output.Put_Line ('ClobAggPrc returned string of length ' || Length (l_enames_c1));
      DBMS_Output.Put_Line ('SimpleAggClob returned string of length ' || Length (l_enames_c2));
      l_timer.Write_Times;
    END;
    SET TIMING OFF
    SET LINES 150
    SET PAGES 1000
    COLUMN id FORMAT A30
    COLUMN line_text FORMAT A120
    SELECT line_text
      FROM output_log
    WHERE id = 'Aggregation'
    ORDER BY line_ind
    /and the results:
    SimpleAggChr returned string of length 5779
    ClobAggPrc returned string of length 5779
    SimpleAggClob returned string of length 5779
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:27.05
    LINE_TEXT
    Timer Set: Aggregation, constructed at 03 Nov 2011 16:27:07, written at 16:27:35
    ================================================================================
    [Timer timed: Elapsed (per call): 0.02 (0.000016), CPU (per call): 0.01 (0.000010), calls: 1000, '***' denotes corrected
    line below]
    Timer              Elapsed          CPU          Calls        Ela/Call        CPU/Call
    SimpleAggChr          9.84         0.36              1         9.84400         0.36000
    ClobAggPrc            9.37         0.32              1         9.37400         0.32000
    SimpleAggClob         8.25         0.22              1         8.25000         0.22000
    (Other)               0.00         0.00              1         0.00000         0.00000
    Total                27.47         0.90              4         6.86700         0.22500
    13 rows selected.

  • Help!! recursive function call

        *   The function which build the category tree
        public String categoryTree(Statement stat, boolean isMore, int id) {
            if(!isMore) {
                return "";
            else
               String sql = " select t_category_relation.category_relation_id, t_category_relation.level_in, " +
                            " t_category_item.category_item_id, t_category_item.category_name_jpn_NV from " +
                            " t_category_item, t_category_relation " +
                            " where " +
                            " t_category_item.category_item_id = t_category_relation.category_item_id and " +
                            " t_category_relation.parent_id = " + id + " and t_category_relation.parent_id<>0";
    //           return sql;
               try{
                   ResultSet res = stat.executeQuery(sql);
                   String spacer = "";
                   String input = "";
                   while(res.next()) {
                        int level = res.getInt(2);
                         id = res.getInt(1);
                         for(int i = 0; i < level; i ++) {
                            spacer +="   ";
                         input ="+ id: " +id + " NAME  " + res.getString(4) + "\n</td>\n<td align=center>\n<input type=checkbox value=" +String.valueOf(id) + " name=categoryid>\n</td>\n</tr>\n";
                         return "\t\t<TR>\n\t\t\t<TD>" + spacer + input + categoryTree(stat, true, id);
                   if(spacer.equals("")){
                        return input+categoryTree(stat, false, id);
                }catch(SQLException e) {
                        return "SQL Exception";
                return categoryTree(stat, false, id);
        }I am writing a menu generated base on a tree like relation ship that is store in a database. assume
    vegetable has two child and one of the child has another child and so forth.
    But I am getting a result like this:
    vegetable-->
    <1>childe
    <1.1>childe
    but missing <2>child
    because the while loop doesn't continous looping after the 1.1.
    please help me out
    thanx in advance

    >
    Re: help!! recursive function call
    Author: DrClap Aug 3, 2001 1:15 PM
    When you call the method recursively, the second call makes a second query to the database, before you have finished using the ResultSet from the first query. Since you are using the same Statement, executing the second query causes the first query to, um, disappear.
    The API documentation for java.sql.Statement says this: "Only one ResultSet object per Statement object can be open at any point in time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All statement execute methods implicitly close a statment's current ResultSet object if an open one exists."
    thanx for your reply!
        public String categoryTree(int id) {
               String sql = " select t_category_relation.category_relation_id, t_category_relation.level_in, " +
                            " t_category_item.category_item_id, t_category_item.category_name_jpn_NV from " +
                            " t_category_item, t_category_relation " +
                            " where " +
                            " t_category_item.category_item_id = t_category_relation.category_item_id and " +
                            " t_category_relation.parent_id = " + id;
               try{
                   Connection con = DataSourceUtil.getConnection("name");
                   Statement stat = con.createStatement();
                   ResultSet res = stat.executeQuery(sql);
                   String spacer = "";
                   String row = "";
                   while(res.next()) {
                        int level = res.getInt(2);
                         id = res.getInt(1);
                         for(int i = 0; i < level; i++) {
                            spacer +="   ";
                        row = " \t\t<tr>\n " +
                              " \t\t\t<td colspan='2'>" + spacer + " <a href=inventory_edit_product.jsp?categoryid=" + id +">" + res.getString(4) + "</a></td>\n" +
                              " \t\t</tr>\n ";
                         return (row + categoryTree(id));
                   con.close();
                }catch(SQLException e) {
                        return "<tr><td colspan=2>SQL Exception</td></tr>";
                return "";
        }New I think every recursive call will have it's own statement and resultSet but I am still getting same problem. The while loop stopped when calls reached first base case. Does anybody know why. I expect, assume that while loop will go next when a call reaches the base case which will return "".
    Thanx for help

  • It seems the basic encryption/decryption functions are unreliable,

    I am having trouble with the following code. I am just using the resources provided in the latest SDK.
    My code compiles and appears to run without generating any errors. The problem is that I have yet to get back the same string as I entered.
    I am following an example in a J2EE security text, but the example seems to be incomplete.
    I suspect the problem is not so much with the encryption and decryption functions per se, but rather a problem, not discussed in any of the references I have read, with managing and storing the cipher text. Can anyone confirm or refute my suspicions, and/or show me how to modify my code so that it invariably results in the decrypted string being identical to the original plain text string?
    It looks like the cipher text I will get will invariably be binary data, and not just sequences of alphanumeric characters. Can anyone tell me where I can find a function that will generate a unique integer for an arbitrary length byte array, or how one might be constructed? Or, if there is one, perhaps someone can tell me if there is a good encryption algorithm that will create cipher text that consists only of a sequence of alphanumeric characters.
    Here are the two relevant functions, along with the relevant declarations of class data members:
        private void encryptBTNMouseClicked(java.awt.event.MouseEvent evt) {
            if ( !OK2run ) return;
            String tmp = PlainTextArea.getText();
            int length = tmp.length();
            if (length < 20) {
                tmp = new String("We need a longer string. we are trying to understand encryption and decryption.");
                PlainTextArea.setText(tmp);
            try {
                myCypher.init(Cipher.ENCRYPT_MODE,sk);
            } catch (java.security.InvalidKeyException ivke) {
                PlainTextArea.setText("Problem with key!");
            byte[] pBytes = tmp.getBytes();
            byte[] cBytes = null;
            try {
                cBytes = myCypher.doFinal(pBytes);
            } catch (javax.crypto.BadPaddingException nspe) {
                CypherTextArea.setText("Problem with padding!");
            } catch (javax.crypto.IllegalBlockSizeException ibse) {
                CypherTextArea.setText("Problem with block size!");
            tmp = new String(cBytes);
            CypherTextArea.setText(tmp);
            tmp = PlainTextArea.getText() + "\n\nWrapped Key = " + wrappedKey;
            PlainTextArea.setText(tmp);
            decryptBTN.enable();
        private void decryptBTNMouseClicked(java.awt.event.MouseEvent evt) {
            String tmp = CypherTextArea.getText();
            byte[] cBytes = tmp.getBytes();
            try {
                myCypher.init(Cipher.DECRYPT_MODE,sk);
            } catch (java.security.InvalidKeyException ivke) {
                DecypheredTextArea.setText("Problem with key!");
            byte[] dBytes = null;
            try {
                dBytes = myCypher.doFinal(cBytes);
            } catch (javax.crypto.BadPaddingException nspe) {
                CypherTextArea.setText("Problem with padding!");
            } catch (javax.crypto.IllegalBlockSizeException ibse) {
                DecypheredTextArea.setText("Problem with block size!");
            tmp = new String(dBytes);
            DecypheredTextArea.setText(tmp);
        private javax.crypto.KeyGenerator kg;
        private boolean OK2run = false;
        private javax.crypto.SecretKey sk = null;
        private javax.crypto.Cipher myCypher = null;
        private byte[] theBytes = null;
        private String wrappedKey = null;Thanks,
    Ted

    One should not try to create a String object from the encrypted bytes using
    tmp = new String(cBytes);
    because it is not guaranteed to be reversible.
    If you need a String then use Base64 or Hex encoding. Google for Jakarta Commons Codec.

  • Help with a ROUND function

    Hi everyone, can someone please help me with a function to use here please. I have a nine digit number e,g (000046650 and 024063870). I would like to convert this to 4 digits before the comma and 5 digits after the comma. So it must be something like this (0000,46650 and 0240,63870). I thought I could easily do this with a ROUND function, but it doesn't work. Could somebody please help by telling me what I'm missing?
    Thank you all for your help.

    Hi,
    I must be missing something, but why don't you just divide by 10000 ?Scott@my11g SQL>with d as (
      2  select 000046650 n from dual
      3  union all
      4  select 024063870 from dual
      5  )
      6  select n/10000 from d ;
       N/10000
         4.665
      2406.387You can then use a to_char with fmt to format it with zero padding :Scott@my11g SQL>with d as (
      2  select 000046650 n from dual
      3  union all
      4  select 024063870 from dual
      5  )
      6  select to_char(n/10000,'0000.00000') nn from d ;
    NN
    0004.66500
    2406.38700

  • Need help tuning slow running query

    Need help tuning below two Oracle queries:
    Query #1:
    ======================
    SELECT "WORK_ORDER_FACT_ALL_YESTERDAY"."WORK_ORDER_HISTORY_ID",
    "WORK_ORDER_FACT_ALL_YESTERDAY"."ACCOUNT_NUMBER",
    "ACCOUNT_DIM"."ACCOUNT_NUMBER", "ACCOUNT_DIM"."ACCOUNT_WS_DISC_DATE"
    FROM "CDWD"."WORK_ORDER_FACT_ALL_YESTERDAY" "WORK_ORDER_FACT_ALL_YESTERDAY",
    "CDWD"."ACCOUNT_DIM" "ACCOUNT_DIM"
    WHERE (SUBSTR ("WORK_ORDER_FACT_ALL_YESTERDAY"."ACCOUNT_FIRST_NAME", 1, 1) =
    SUBSTR ("ACCOUNT_DIM"."ACCOUNT_FIRST_NAME", 1, 1)
    AND (SUBSTR ("WORK_ORDER_FACT_ALL_YESTERDAY"."ACCOUNT_LAST_NAME", 1, 4) =
    SUBSTR ("ACCOUNT_DIM"."ACCOUNT_LAST_NAME", 1, 4)
    AND ("WORK_ORDER_FACT_ALL_YESTERDAY"."ACCOUNT_DL_NUMBER" =
    "ACCOUNT_DIM"."ACCOUNT_DL_NUMBER"
    AND "WORK_ORDER_FACT_ALL_YESTERDAY"."WO_TYPE_CODE" IN ('25', '27')
    AND ("ACCOUNT_DIM"."REVENUE_TYPE_ID" = 1)
    AND ("WORK_ORDER_FACT_ALL_YESTERDAY"."TRANSFER_COUNT" = 0)
    AND ("WORK_ORDER_FACT_ALL_YESTERDAY"."WINBACK_ADD_COUNT" = 0)
    AND ("ACCOUNT_DIM"."ACCOUNT_WS_ENTRY_DATE" <
    (TO_DATE ('2006.05.02', 'yyyy.mm.dd') - 11
    AND ("WORK_ORDER_FACT_ALL_YESTERDAY"."IS_DERIVED" = 0)
    AND ("ACCOUNT_DIM"."EXPIRATION_DATE" IS NULL)
    AND ("WORK_ORDER_FACT_ALL_YESTERDAY"."ACT_ACCOUNT_TYPE_CD" <> '50');
    Query #2
    ==================
    UPDATE work_order_fact_all_yesterday g
    SET returns_count = 1
    WHERE EXISTS (SELECT 1
    FROM (SELECT a.phone_dim_key AS transactional_phone_dim_key,
    b.mdn_number AS transactional_mdn_number,
    b.account_number AS transactional_account_number
    FROM work_order_fact_all_yesterday a INNER JOIN phone_dim b ON a.phone_dim_key = b.phone_dim_key
    WHERE a.gross_deactivations_count = 1) e
    INNER JOIN (SELECT c.phone_dim_key AS historical_phone_dim_key,
    d.mdn_number AS historical_mdn_number,
    d.account_number AS historical_account_number
    FROM (SELECT phone_dim_key
    FROM work_order_activity_fact
    WHERE gross_adds_count = 1
    AND report_date >= :b1 - 66
    AND NVL (is_derived, 0 ) = 0
    UNION
    SELECT phone_dim_key
    FROM work_order_fact_all_yesterday
    WHERE gross_adds_count = 1
    AND is_derived = 0) c
    INNER JOIN phone_dim d ON c.phone_dim_key = d.phone_dim_key ) f
    ON e.transactional_mdn_number = f.historical_mdn_number
    AND e.transactional_account_number = f.historical_account_number
    WHERE e.transactional_phone_dim_key = g.phone_dim_key)
    AND g.gross_deactivations_count = 1
    AND g.account_revenue_type_id = 1;
    I ran the DBMS_SQLTUNE on it for 10g and did not get any advice. How can I tune the above queries? Thanks!

    Tune the SQL? Looking at the join criteria of SUBSTR("WORK_ORDER_FACT_ALL_YESTERDAY"."ACCOUNT_FIRST_NAME", 1, 1) = SUBSTR ("ACCOUNT_DIM"."ACCOUNT_FIRST_NAME", 1, 1) and other substrings, it seems to me that you have basic flaws in your relation design.
    Column must be atomic values. Having to extract a sub-set value from a column to create the intelligence needed to join to another table - that is just plain wrong in relation design. Never mind the performance impact and overheads it causes in the database.

  • Encrypt  and Decrypt  function modules

    Hi
    Please tell the function module names to Encrypt the code with key and Decrypt code with key.
    i know these function module names
    'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_DECRYPT'
    but its not working.
    Is there any other function modules?
    if it is not there please tell the documentation of the to create  encrypt function module and decrypt function module.
    Thanks.
    Edited by: Craig Cmehil on Jul 18, 2008 10:01 AM

    try this it will do little bit closer to encription and decription
    DATA:
    g_key TYPE i VALUE 26101957,
    g_slen TYPE i,
    g_pwd type string VALUE 'Pass1234',
    g_pwd1 type xstring ,
    obj type ref to cl_http_utility.
    CREATE OBJECT obj.
    CALL METHOD obj->if_http_utility~encode_utf8
      EXPORTING
        unencoded         = g_pwd
      receiving
        encoded           = g_pwd1
      EXCEPTIONS
        conversion_failed = 1
        others            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD obj->if_http_utility~decode_utf8
      EXPORTING
        encoded           = g_pwd1
      receiving
        unencoded         = g_pwd
    EXCEPTIONS
       conversion_failed = 1
       others            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    write:/ g_pwd.

  • How to implement "Application Help" for activated Businiess Functions & Add Ons?

    Dear all
    I am setting up a SAP NetWeaver System with Business Function INSURANCE activated (for the use of FS-CD) and the reinsurance Add On FS-RI installed.
    I am able to set up "Application Help" in transaction SR13 for the "ERP/ECC part", meaning: When I open some "normal" ECC/ERP transaction, like MM03 oder PA20 and click on ("Help" in menubar >) "Application Help" in SAP Gui, a browser opens an shows me the context sensitive online help page for the corresponding transaction. (For PA20, this is "Displaying HR Master Data", for MM03 it's "Displaying Material Master Records")
    If I open an FS-RI transaction (like "/MSG/H_BORD1" oder "/MSG/R_V3"), I am only forwarded to the general SAP Library. But there is an online documentation available ("SAP for Industries" > "SAP Insurance Management" > ...)
    So, how to link the Business Functions and Add Ons with the Online Help?
    Is there a simple way to set up "Application Help" for activated Business Functions and installed Add Ons?
    I found some (online) documentation, but this is all more confusing than helping...
    Thanks for any help!
    Frank

    Second, when you create a Core Data Document Based application, XCode generates the MyDocument class, derivating from NSPersistentDocument. This class is dedicated to maintain the Managed Object Model and the Managed Object Context of each document of your application.
    There is only one Context and generally one Model for each Document.
    In Interface Builder, the Managed Object Context must be bound to the managedObjectContext of the MyDocument instance: it's the File's owner of the myDocument.xib Nib file.
    It's not the case in your Nib File where the Managed Object Context is bound to the invoiceID of the Invoice Controller.
    It's difficult to help you without an overall knowledge of your application, perhaps could you create an InvoiceItem Controller and bind its Content Set to the relationship of your invoice.

  • Help - tuning analytic functions

    Where can I find information on hints to speed up oracle analytic functions?
    The table xyz has about 12 million rows.
    The col1 / col2 combinations are effective dated and have an Active /Inactive status.
    Table xyz: col1, col2, effdt, status.
    Goal: I want to eliminate the col1 / col2 combinations where all rows over time have an Inactive status.
    The sq I wrote looks like this:
    select * from
    select col1, col2,
    SUM (1) OVER (PARTITION BY f.col1, f.col2 ORDER BY fcol1, f.col2) total_cnt,
    SUM (CASE WHEN f.status = 'I' THEN 1 ELSE 0 END) OVER
    (PARTITION BY f.col1, f.col2 ORDER BY f.col1) inactive_cnt
    from table xyz f
    where total_cnt > inactive_cnt
    Thanks,
    Frank

    Have a look at these standard threads:
    How to post a tuning request:
    HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long:
    When your query takes too long ...

  • Performance Tuning the AVG function

    Dear All,
    I have a table which is rapidly growing. We have a query which is frequently executed on this table and it utilizes AVG function without a WHERE clause. Is there a way to tune this query?
    I tried to create a Materialized View but Oracle rejects as AVG cannot be used in MV's. Also, it is now really easy at this point in time to rewrite the query.
    Appreciate if anybody can help me out in this situation.
    OS: Windows 2003 EE
    Database: Oracle 10g R2 10.2.0.4
    Sample Table:
    Create table t(id number, name varchar2(30), amt number);
    insert into t select level, 'level - ' || level, level * 100 from dual connect by dual level <= 1000;
    commit;
    Query:
    select avg(amount) from t;
    Thanks for you time.
    - P

    >
    ... and it utilizes AVG function without a WHERE clause
    >
    As Aman stated, a full table scan will be needed for a statement without a WHERE clause.
    See these threads on how to post a tuning request
    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting
    HTH
    Srini

  • Help with substitution decryption plz!!

    Hi there,
    I'm relatively new to developing with Java, and as a piece of work I have to decrypt a cipher text (which is quite long, near 11,500 characters) that has been encrypted with substitution and is in english.
    It consists of upper case letters, and some punctuation symbols, although whether they will actually function as punctuation i'm not sure; they seem to be just breaking the cipher into chunks of the alphabetic characters, and not in any uniform manner (eg every 12 characters). I did think maybe they'll be where spaces will need to go but that would be a little obvious, and some 'chunks' are too large for that to even make sense (over 50 characters). Maybe they're just a kind of wildcard to make it more complicated to analyse.
    As i understand it i need to use frequency tables_. I want to deduce the letters for those that have a unique frequency (to be sure i've not substituted with the wrong letter if/when there is a few to choose from at the frequency). I think i know how to do this;
    use 2d arrays-
    -- one for the frequency table i'll compare the cipher text against
    -- i have a few examples of these from the internet that i'll base it on,
    since i don't have a piece of the original plaintext to analyse.
    -- is there a better way to get the frequency for comparison? There is some variation in the tables i've managed to find so.
    -- another table for storing the analysis of the cipher text
    The dimensions will be the frequency, and the character.
    For the character, do I need to use ASCII representation? or would it be ok just using characters. Just figured i need to convert the ASCII back into characters to an output file is all. Is there an implemented way to do this conversion in Java easily? I've not had to work with it before so.
    Once i've done that part, I understand I need to use a wordlist_ to try and find words in what i've decrypted so far, and try to further the decryption with this also; ie if i find a word which adds new characters, add those new characters to the whole cipher. When finding words would i need to represent the cipher i'm working on with just the characters i have deduced, and say '_' as a character to represent one we don't yet have? eg if we had substituted B and T in, and the word being represented was 'better' would i need to hunt for words with a representation like this-> BETTE_ for example.
    Hope that bit made sense!!! lol.
    Also, i need to insert spaces where relevant (after a discovered word i suppose).
    This is the part that is most troubling me, any ideas of where to start?
    Firstly, i've not been able to find any wordlist's on the internet, know any sources? Is there a way i could use a dictionary stored on my computer elsewhere? say the dictionary from openOffice? I haven't worked with dictionaries or wordlists before so, any help with this part will greatly improve my understanding/progress.
    Is there an implemented way to do this any of this in Java easily? I'm using the Eclipse IDE just so you know.
    That's my thoughts and questions for the moment, might have more after i hear advice (sorry if it's rather long, just want to be clear).
    Hope you can help,
    Thanks in advance!
    ps. what is the text called you have when you have decrypted it? simply the decryption text? or just plaintext again? is there a term for when it's part way decrypted? like it's not the plaintext yet?

    H84ll1 wrote:
    anybody else out there had much experience with doing this kind of decrytion? I'm quite stuck on the worlist part, where can i get a good one!!? lol.lol. did you really try googling? this search
    http://www.google.com/search?q=wordlist&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    produces this result:
    http://wordlist.sourceforge.net/
    Does anyone know if it's possible to use something already on the computer for the worlist/dictionary part?it looks like the link above will give you better lists
    >
    I really need help on this,
    anyone..?google

  • Help optimizing query with function

    Hello experts,
    I need your help optmizing this query which has a condition that matches on results of non-deterministic function. The non-deterministic functino is fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY. Values that it returns depends on contents of a table, so I can't really create a function index.
    Any input will be appreciated. Thanks in advance!
    Sorry I couln't format the query plan properly. Can somebody advise how? Thanks again!
    Giovanni
    explain plan for
    WITH tg AS
    (SELECT taxgroup_code FROM taxgroup
    WHERE taxgroup_code = 'TAXGROUP2' --?
    AND taxgroup_delete_ind = 'N' AND taxgroup_active_ind = 'A'),
    le_hb AS
    (SELECT tgi.taxgroup_code, tgi.legalentity_id, tgi.hyperionbase_id, ou.orgunit_code, ou.hyperionbase_code
    FROM tg, taxgroupitem tgi, orgunit_vw ou
    WHERE tg.taxgroup_code = tgi.taxgroup_code
    AND tgi.legalentity_id = ou.legalentity_id AND tgi.hyperionbase_id = ou.hyperionbase_id
    UNION
    SELECT tgi.taxgroup_code, tgi.legalentity_id, ou.hyperionbase_id, ou.orgunit_code, ou.hyperionbase_code
    FROM tg, taxgroupitem tgi, orgunit_vw ou
    WHERE tg.taxgroup_code = tgi.taxgroup_code
    AND tgi.legalentity_id = ou.legalentity_id AND tgi.hyperionbase_id IS NULL),
    au AS
    (SELECT appusage_code FROM appusage WHERE appusage_code = 'CONSOLIDATION'),
    prs AS
    (SELECT prs_key,
    (CASE WHEN instr(prs_key, ':') = 0 THEN prs_key
    ELSE SUBSTR(prs_key, 1, (instr(prs_key, ':')-1) ) END) first_val
    FROM
    (SELECT fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(164415 --?
    ) prs_key
    FROM dual
    grs AS
    (SELECT prs.*, fd.fielddata_group_sequence fd_grpseq
    FROM prs, fielddata fd, le_hb
    WHERE prs.first_val = fd.fielddata_value
    AND le_hb.legalentity_id = fd.legalentity_id
    AND le_hb.hyperionbase_id = fd.hyperionbase_id),
    fdk AS
    (SELECT
    cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence) fd_key,
    fd.fielddata_value fd_val, fd.fielddata_group_sequence fd_grpseq,
    ROW_NUMBER() OVER (PARTITION BY cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence)
    ORDER BY fd.fielddata_group_sequence) rn,
    grs.prs_key
    FROM le_hb, grs, fielddata fd, tablecell tc, celldef cd, tabledef td, appusage au
    WHERE le_hb.legalentity_id = fd.legalentity_id AND le_hb.hyperionbase_id = fd.hyperionbase_id
    AND fd.fielddata_id = tc.fielddata_id AND tc.celldef_id = cd.celldef_id
    AND cd.tabledef_id = td.tabledef_id
    AND grs.fd_grpseq = fd.fielddata_parent_row_sequence
    and grs.prs_key = fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_parent_row_sequence)
    AND cd.celldef_key_ind = 'Y'
    AND fd.fielddata_delete_ind = 'N'
    AND td.tabledef_id = 2265
    fda AS
    (SELECT
    cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence) fd_key,
    TO_CHAR(TO_NUMBER(SUM(fd.fielddata_value))) fd_val,
    MIN(fd.fielddata_group_sequence) fd_grpseq,
    grs.prs_key
    FROM le_hb, grs, fielddata fd, tablecell tc, celldef cd, tabledef td
    WHERE le_hb.legalentity_id = fd.legalentity_id AND le_hb.hyperionbase_id = fd.hyperionbase_id
    AND fd.fielddata_id = tc.fielddata_id AND tc.celldef_id = cd.celldef_id
    AND cd.tabledef_id = td.tabledef_id
    AND grs.fd_grpseq = fd.fielddata_parent_row_sequence
    and grs.prs_key = fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_parent_row_sequence)
    AND cd.celldef_adjustable_ind = 'Y'
    AND fd.fielddata_delete_ind = 'N'
    AND td.tabledef_id = 2265
    GROUP BY cd.celldef_id, fedtaxpk.fedtaxpk_pkg.GETFIELDDATAGROUPSEQKEY(fd.fielddata_group_sequence),
    grs.prs_key
    SELECT NULL LEGALENTITY_ID, NULL hyperionbase_id, fdk.celldef_id, TO_CHAR(NULL) role_code, NULL userinfo_id, cd.celldef_adjustable_ind,
    'N' celldef_editable_ind, cd.celldef_filter_code, cd.celldef_validate_rule, cd.celldef_list_code,
    cd.celldef_longstring_ind, aua.appusageaccess_visible_ind celldef_viewable_ind,
    cd.celldef_column_sequence, cd.celldef_column_label,
    cd.celldef_column_sort_order, NULL tablecell_id, fdk.fd_grpseq tablecell_row_sequence, NULL tablecell_row_label,
    'N' tablecell_delete_ind, NULL tablecell_create_by, TO_DATE(NULL) tablecell_create_dt, TO_CHAR(NULL) tablecell_update_by,
    TO_DATE(NULL) tablecell_update_dt, NULL fielddata_id, TO_CHAR(NULL) datatype_code, NULL fielddata_adjref_id,
    fdk.fd_grpseq fielddata_group_sequence, NULL fielddata_parent_row_sequence, NULL lookup_id,
    fdk.fd_val fielddata_value, 'N' fielddata_delete_ind, TO_CHAR(NULL) fielddata_create_by,
    TO_DATE(NULL) fielddata_create_dt, TO_CHAR(NULL) fielddata_update_by, TO_DATE(NULL) fielddata_update_dt,
    fdk.fd_key
    FROM fdk, celldef cd, appusageaccess aua, au
    WHERE fdk.celldef_id = cd.celldef_id
    AND cd.celldef_id = aua.celldef_id
    AND aua.appusage_code = au.appusage_code
    AND fdk.rn = 1
    UNION ALL
    SELECT NULL LEGALENTITY_ID, NULL hyperionbase_id, fda.celldef_id, TO_CHAR(NULL) role_code, NULL userinfo_id, cd.celldef_adjustable_ind,
    'N' celldef_editable_ind, cd.celldef_filter_code, cd.celldef_validate_rule, cd.celldef_list_code,
    cd.celldef_longstring_ind, aua.appusageaccess_visible_ind celldef_viewable_ind,
    cd.celldef_column_sequence, cd.celldef_column_label,
    cd.celldef_column_sort_order, NULL tablecell_id, fda.fd_grpseq tablecell_row_sequence, NULL tablecell_row_label,
    'N' tablecell_delete_ind, NULL tablecell_create_by, TO_DATE(NULL) tablecell_create_dt, TO_CHAR(NULL) tablecell_update_by,
    TO_DATE(NULL) tablecell_update_dt, NULL fielddata_id, TO_CHAR(NULL) datatype_code, NULL fielddata_adjref_id,
    fda.fd_grpseq fielddata_group_sequence, NULL fielddata_parent_row_sequence, NULL lookup_id,
    fda.fd_val fielddata_value, 'N' fielddata_delete_ind, TO_CHAR(NULL) fielddata_create_by,
    TO_DATE(NULL) fielddata_create_dt, TO_CHAR(NULL) fielddata_update_by, TO_DATE(NULL) fielddata_update_dt,
    fda.fd_key
    FROM fda, celldef cd, appusageaccess aua, au
    WHERE fda.celldef_id = cd.celldef_id
    AND cd.celldef_id = aua.celldef_id
    AND aua.appusage_code = au.appusage_code
    ORDER BY fielddata_group_sequence, celldef_column_sequence
    Query Plan:
    Plan hash value: 522363234
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 2 | 6227 | 249 (2)| 00:00:03 |
    | 1 | TEMP TABLE TRANSFORMATION | | | | | |
    | 2 | LOAD AS SELECT | | | | | |
    |* 3 | TABLE ACCESS BY INDEX ROWID | TAXGROUP | 1 | 14 | 1 (0)| 00:00:01 |
    |* 4 | INDEX UNIQUE SCAN | PK_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    | 5 | LOAD AS SELECT | | | | | |
    | 6 | SORT UNIQUE | | 4 | 224 | 12 (59)| 00:00:01 |
    | 7 | UNION-ALL | | | | | |
    | 8 | TABLE ACCESS BY INDEX ROWID | ORGUNIT | 1 | 29 | 2 (0)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 56 | 5 (0)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 27 | 3 (0)| 00:00:01 |
    | 11 | VIEW | | 1 | 10 | 2 (0)| 00:00:01 |
    | 12 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B51_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    |* 13 | TABLE ACCESS BY INDEX ROWID | TAXGROUPITEM | 1 | 17 | 1 (0)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | XF1_TAXGROUPITEM_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    |* 15 | INDEX RANGE SCAN | XF1_ORGUNIT_ID | 1 | | 1 (0)| 00:00:01 |
    | 16 | TABLE ACCESS BY INDEX ROWID | ORGUNIT | 3 | 87 | 2 (0)| 00:00:01 |
    | 17 | NESTED LOOPS | | 3 | 168 | 5 (0)| 00:00:01 |
    | 18 | NESTED LOOPS | | 1 | 27 | 3 (0)| 00:00:01 |
    | 19 | VIEW | | 1 | 10 | 2 (0)| 00:00:01 |
    | 20 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B51_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    |* 21 | TABLE ACCESS BY INDEX ROWID | TAXGROUPITEM | 1 | 17 | 1 (0)| 00:00:01 |
    |* 22 | INDEX RANGE SCAN | XF1_TAXGROUPITEM_TAXGROUP | 1 | | 0 (0)| 00:00:01 |
    |* 23 | INDEX RANGE SCAN | XF1_ORGUNIT_ID | 3 | | 1 (0)| 00:00:01 |
    | 24 | LOAD AS SELECT | | | | | |
    |* 25 | INDEX UNIQUE SCAN | PK_APPUSAGE | 1 | 10 | 0 (0)| 00:00:01 |
    | 26 | LOAD AS SELECT | | | | | |
    |* 27 | TABLE ACCESS BY INDEX ROWID | FIELDDATA | 7 | 147 | 28 (0)| 00:00:01 |
    | 28 | NESTED LOOPS | | 27 | 1269 | 117 (1)| 00:00:02 |
    | 29 | NESTED LOOPS | | 4 | 104 | 4 (0)| 00:00:01 |
    | 30 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
    | 31 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 32 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 33 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 34 | SORT ORDER BY | | 2 | 6227 | 248 (51)| 00:00:03 |
    | 35 | UNION-ALL | | | | | |
    | 36 | NESTED LOOPS | | 1 | 4110 | 125 (2)| 00:00:02 |
    | 37 | MERGE JOIN CARTESIAN | | 1 | 4093 | 124 (2)| 00:00:02 |
    | 38 | NESTED LOOPS | | 1 | 4076 | 122 (2)| 00:00:02 |
    |* 39 | VIEW | | 1 | 4043 | 121 (2)| 00:00:02 |
    |* 40 | WINDOW SORT PUSHED RANK | | 1 | 2099 | 121 (2)| 00:00:02 |
    | 41 | MERGE JOIN CARTESIAN | | 1 | 2099 | 120 (1)| 00:00:02 |
    | 42 | NESTED LOOPS | | 1 | 2099 | 119 (1)| 00:00:02 |
    | 43 | NESTED LOOPS | | 1 | 2088 | 118 (1)| 00:00:02 |
    |* 44 | HASH JOIN | | 1 | 2077 | 117 (1)| 00:00:02 |
    |* 45 | TABLE ACCESS BY INDEX ROWID| FIELDDATA | 117 | 3744 | 28 (0)| 00:00:01 |
    | 46 | NESTED LOOPS | | 466 | 28892 | 114 (0)| 00:00:02 |
    | 47 | NESTED LOOPS | | 4 | 120 | 2 (0)| 00:00:01 |
    |* 48 | INDEX UNIQUE SCAN | PK_TABLEDEF | 1 | 4 | 0 (0)| 00:00:01 |
    | 49 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 50 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 51 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 52 | VIEW | | 27 | 54405 | 2 (0)| 00:00:01 |
    | 53 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B54_2EBE182 | 27 | 1269 | 2 (0)| 00:00:01 |
    | 54 | TABLE ACCESS BY INDEX ROWID | TABLECELL | 1 | 11 | 1 (0)| 00:00:01 |
    |* 55 | INDEX UNIQUE SCAN | XF1_TBLCEL_DATA | 1 | | 0 (0)| 00:00:01 |
    |* 56 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 11 | 1 (0)| 00:00:01 |
    |* 57 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 58 | BUFFER SORT | | 5 | | 120 (2)| 00:00:02 |
    | 59 | INDEX FULL SCAN | PK_APPUSAGE | 5 | | 1 (0)| 00:00:01 |
    | 60 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 33 | 1 (0)| 00:00:01 |
    |* 61 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 62 | BUFFER SORT | | 1 | 17 | 123 (2)| 00:00:02 |
    | 63 | VIEW | | 1 | 17 | 2 (0)| 00:00:01 |
    | 64 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B53_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    | 65 | TABLE ACCESS BY INDEX ROWID | APPUSAGEACCESS | 1 | 17 | 1 (0)| 00:00:01 |
    |* 66 | INDEX UNIQUE SCAN | AK_APPUSAGEACCESS | 1 | | 0 (0)| 00:00:01 |
    | 67 | NESTED LOOPS | | 1 | 2117 | 124 (2)| 00:00:02 |
    | 68 | MERGE JOIN CARTESIAN | | 1 | 2100 | 123 (2)| 00:00:02 |
    | 69 | NESTED LOOPS | | 1 | 2083 | 121 (2)| 00:00:02 |
    | 70 | VIEW | | 1 | 2050 | 120 (2)| 00:00:02 |
    | 71 | HASH GROUP BY | | 1 | 2091 | 120 (2)| 00:00:02 |
    | 72 | NESTED LOOPS | | 1 | 2091 | 119 (1)| 00:00:02 |
    | 73 | NESTED LOOPS | | 1 | 2080 | 118 (1)| 00:00:02 |
    |* 74 | HASH JOIN | | 1 | 2069 | 117 (1)| 00:00:02 |
    |* 75 | TABLE ACCESS BY INDEX ROWID | FIELDDATA | 117 | 3744 | 28 (0)| 00:00:01 |
    | 76 | NESTED LOOPS | | 466 | 28892 | 114 (0)| 00:00:02 |
    | 77 | NESTED LOOPS | | 4 | 120 | 2 (0)| 00:00:01 |
    |* 78 | INDEX UNIQUE SCAN | PK_TABLEDEF | 1 | 4 | 0 (0)| 00:00:01 |
    | 79 | VIEW | | 4 | 104 | 2 (0)| 00:00:01 |
    | 80 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B52_2EBE182 | 4 | 388 | 2 (0)| 00:00:01 |
    |* 81 | INDEX RANGE SCAN | XF11_DATA_LE_HB | 117 | | 12 (0)| 00:00:01 |
    | 82 | VIEW | | 27 | 54189 | 2 (0)| 00:00:01 |
    | 83 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B54_2EBE182 | 27 | 1269 | 2 (0)| 00:00:01 |
    | 84 | TABLE ACCESS BY INDEX ROWID | TABLECELL | 1 | 11 | 1 (0)| 00:00:01 |
    |* 85 | INDEX UNIQUE SCAN | XF1_TBLCEL_DATA | 1 | | 0 (0)| 00:00:01 |
    |* 86 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 11 | 1 (0)| 00:00:01 |
    |* 87 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 88 | TABLE ACCESS BY INDEX ROWID | CELLDEF | 1 | 33 | 1 (0)| 00:00:01 |
    |* 89 | INDEX UNIQUE SCAN | PK_CELLDEF | 1 | | 0 (0)| 00:00:01 |
    | 90 | BUFFER SORT | | 1 | 17 | 122 (2)| 00:00:02 |
    | 91 | VIEW | | 1 | 17 | 2 (0)| 00:00:01 |
    | 92 | TABLE ACCESS FULL | SYS_TEMP_0FD9D9B53_2EBE182 | 1 | 10 | 2 (0)| 00:00:01 |
    | 93 | TABLE ACCESS BY INDEX ROWID | APPUSAGEACCESS | 1 | 17 | 1 (0)| 00:00:01 |
    |* 94 | INDEX UNIQUE SCAN | AK_APPUSAGEACCESS | 1 | | 0 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - filter("TAXGROUP_DELETE_IND"='N' AND "TAXGROUP_ACTIVE_IND"='A')
    4 - access("TAXGROUP_CODE"='TAXGROUP2')
    13 - filter("TGI"."HYPERIONBASE_ID" IS NOT NULL)
    14 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
    15 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID" AND "TGI"."HYPERIONBASE_ID"="OU"."HYPERIONBASE_ID")
    21 - filter("TGI"."HYPERIONBASE_ID" IS NULL)
    22 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
    23 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID")
    25 - access("APPUSAGE_CODE"='CONSOLIDATION')
    27 - filter("FD"."FIELDDATA_VALUE"=CASE INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),':') WHEN 0
    THEN "FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415) ELSE
    SUBSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),1,INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(16441
    5),':')-1) END )
    33 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    39 - filter("FDK"."RN"=1)
    40 - filter(ROW_NUMBER() OVER ( PARTITION BY "CD"."CELLDEF_ID","FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"
    ."FIELDDATA_GROUP_SEQUENCE") ORDER BY "FD"."FIELDDATA_GROUP_SEQUENCE")<=1)
    44 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
    "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
    45 - filter("FD"."FIELDDATA_DELETE_IND"='N')
    48 - access("TD"."TABLEDEF_ID"=2265)
    51 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    55 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
    56 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_KEY_IND"='Y')
    57 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
    61 - access("FDK"."CELLDEF_ID"="CD"."CELLDEF_ID")
    66 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")
    74 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
    "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
    75 - filter("FD"."FIELDDATA_DELETE_IND"='N')
    78 - access("TD"."TABLEDEF_ID"=2265)
    81 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
    "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
    85 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
    86 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_ADJUSTABLE_IND"='Y')
    87 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
    89 - access("FDA"."CELLDEF_ID"="CD"."CELLDEF_ID")
    94 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")

    Thanks cd.
    Here's the query plan:
    Query Plan:
    Plan hash value: 522363234
    | Id  | Operation                               | Name                       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                        |                            |     2 |  6227 |   249   (2)| 00:00:03 |
    |   1 |  TEMP TABLE TRANSFORMATION              |                            |       |       |            |          |
    |   2 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |*  3 |    TABLE ACCESS BY INDEX ROWID          | TAXGROUP                   |     1 |    14 |     1   (0)| 00:00:01 |
    |*  4 |     INDEX UNIQUE SCAN                   | PK_TAXGROUP                |     1 |       |     0   (0)| 00:00:01 |
    |   5 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |   6 |    SORT UNIQUE                          |                            |     4 |   224 |    12  (59)| 00:00:01 |
    |   7 |     UNION-ALL                           |                            |       |       |            |          |
    |   8 |      TABLE ACCESS BY INDEX ROWID        | ORGUNIT                    |     1 |    29 |     2   (0)| 00:00:01 |
    |   9 |       NESTED LOOPS                      |                            |     1 |    56 |     5   (0)| 00:00:01 |
    |  10 |        NESTED LOOPS                     |                            |     1 |    27 |     3   (0)| 00:00:01 |
    |  11 |         VIEW                            |                            |     1 |    10 |     2   (0)| 00:00:01 |
    |  12 |          TABLE ACCESS FULL              | SYS_TEMP_0FD9D9B51_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |* 13 |         TABLE ACCESS BY INDEX ROWID     | TAXGROUPITEM               |     1 |    17 |     1   (0)| 00:00:01 |
    |* 14 |          INDEX RANGE SCAN               | XF1_TAXGROUPITEM_TAXGROUP  |     1 |       |     0   (0)| 00:00:01 |
    |* 15 |        INDEX RANGE SCAN                 | XF1_ORGUNIT_ID             |     1 |       |     1   (0)| 00:00:01 |
    |  16 |      TABLE ACCESS BY INDEX ROWID        | ORGUNIT                    |     3 |    87 |     2   (0)| 00:00:01 |
    |  17 |       NESTED LOOPS                      |                            |     3 |   168 |     5   (0)| 00:00:01 |
    |  18 |        NESTED LOOPS                     |                            |     1 |    27 |     3   (0)| 00:00:01 |
    |  19 |         VIEW                            |                            |     1 |    10 |     2   (0)| 00:00:01 |
    |  20 |          TABLE ACCESS FULL              | SYS_TEMP_0FD9D9B51_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |* 21 |         TABLE ACCESS BY INDEX ROWID     | TAXGROUPITEM               |     1 |    17 |     1   (0)| 00:00:01 |
    |* 22 |          INDEX RANGE SCAN               | XF1_TAXGROUPITEM_TAXGROUP  |     1 |       |     0   (0)| 00:00:01 |
    |* 23 |        INDEX RANGE SCAN                 | XF1_ORGUNIT_ID             |     3 |       |     1   (0)| 00:00:01 |
    |  24 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |* 25 |    INDEX UNIQUE SCAN                    | PK_APPUSAGE                |     1 |    10 |     0   (0)| 00:00:01 |
    |  26 |   LOAD AS SELECT                        |                            |       |       |            |          |
    |* 27 |    TABLE ACCESS BY INDEX ROWID          | FIELDDATA                  |     7 |   147 |    28   (0)| 00:00:01 |
    |  28 |     NESTED LOOPS                        |                            |    27 |  1269 |   117   (1)| 00:00:02 |
    |  29 |      NESTED LOOPS                       |                            |     4 |   104 |     4   (0)| 00:00:01 |
    |  30 |       FAST DUAL                         |                            |     1 |       |     2   (0)| 00:00:01 |
    |  31 |       VIEW                              |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  32 |        TABLE ACCESS FULL                | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 33 |      INDEX RANGE SCAN                   | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  34 |   SORT ORDER BY                         |                            |     2 |  6227 |   248  (51)| 00:00:03 |
    |  35 |    UNION-ALL                            |                            |       |       |            |          |
    |  36 |     NESTED LOOPS                        |                            |     1 |  4110 |   125   (2)| 00:00:02 |
    |  37 |      MERGE JOIN CARTESIAN               |                            |     1 |  4093 |   124   (2)| 00:00:02 |
    |  38 |       NESTED LOOPS                      |                            |     1 |  4076 |   122   (2)| 00:00:02 |
    |* 39 |        VIEW                             |                            |     1 |  4043 |   121   (2)| 00:00:02 |
    |* 40 |         WINDOW SORT PUSHED RANK         |                            |     1 |  2099 |   121   (2)| 00:00:02 |
    |  41 |          MERGE JOIN CARTESIAN           |                            |     1 |  2099 |   120   (1)| 00:00:02 |
    |  42 |           NESTED LOOPS                  |                            |     1 |  2099 |   119   (1)| 00:00:02 |
    |  43 |            NESTED LOOPS                 |                            |     1 |  2088 |   118   (1)| 00:00:02 |
    |* 44 |             HASH JOIN                   |                            |     1 |  2077 |   117   (1)| 00:00:02 |
    |* 45 |              TABLE ACCESS BY INDEX ROWID| FIELDDATA                  |   117 |  3744 |    28   (0)| 00:00:01 |
    |  46 |               NESTED LOOPS              |                            |   466 | 28892 |   114   (0)| 00:00:02 |
    |  47 |                NESTED LOOPS             |                            |     4 |   120 |     2   (0)| 00:00:01 |
    |* 48 |                 INDEX UNIQUE SCAN       | PK_TABLEDEF                |     1 |     4 |     0   (0)| 00:00:01 |
    |  49 |                 VIEW                    |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  50 |                  TABLE ACCESS FULL      | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 51 |                INDEX RANGE SCAN         | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  52 |              VIEW                       |                            |    27 | 54405 |     2   (0)| 00:00:01 |
    |  53 |               TABLE ACCESS FULL         | SYS_TEMP_0FD9D9B54_2EBE182 |    27 |  1269 |     2   (0)| 00:00:01 |
    |  54 |             TABLE ACCESS BY INDEX ROWID | TABLECELL                  |     1 |    11 |     1   (0)| 00:00:01 |
    |* 55 |              INDEX UNIQUE SCAN          | XF1_TBLCEL_DATA            |     1 |       |     0   (0)| 00:00:01 |
    |* 56 |            TABLE ACCESS BY INDEX ROWID  | CELLDEF                    |     1 |    11 |     1   (0)| 00:00:01 |
    |* 57 |             INDEX UNIQUE SCAN           | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  58 |           BUFFER SORT                   |                            |     5 |       |   120   (2)| 00:00:02 |
    |  59 |            INDEX FULL SCAN              | PK_APPUSAGE                |     5 |       |     1   (0)| 00:00:01 |
    |  60 |        TABLE ACCESS BY INDEX ROWID      | CELLDEF                    |     1 |    33 |     1   (0)| 00:00:01 |
    |* 61 |         INDEX UNIQUE SCAN               | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  62 |       BUFFER SORT                       |                            |     1 |    17 |   123   (2)| 00:00:02 |
    |  63 |        VIEW                             |                            |     1 |    17 |     2   (0)| 00:00:01 |
    |  64 |         TABLE ACCESS FULL               | SYS_TEMP_0FD9D9B53_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |  65 |      TABLE ACCESS BY INDEX ROWID        | APPUSAGEACCESS             |     1 |    17 |     1   (0)| 00:00:01 |
    |* 66 |       INDEX UNIQUE SCAN                 | AK_APPUSAGEACCESS          |     1 |       |     0   (0)| 00:00:01 |
    |  67 |     NESTED LOOPS                        |                            |     1 |  2117 |   124   (2)| 00:00:02 |
    |  68 |      MERGE JOIN CARTESIAN               |                            |     1 |  2100 |   123   (2)| 00:00:02 |
    |  69 |       NESTED LOOPS                      |                            |     1 |  2083 |   121   (2)| 00:00:02 |
    |  70 |        VIEW                             |                            |     1 |  2050 |   120   (2)| 00:00:02 |
    |  71 |         HASH GROUP BY                   |                            |     1 |  2091 |   120   (2)| 00:00:02 |
    |  72 |          NESTED LOOPS                   |                            |     1 |  2091 |   119   (1)| 00:00:02 |
    |  73 |           NESTED LOOPS                  |                            |     1 |  2080 |   118   (1)| 00:00:02 |
    |* 74 |            HASH JOIN                    |                            |     1 |  2069 |   117   (1)| 00:00:02 |
    |* 75 |             TABLE ACCESS BY INDEX ROWID | FIELDDATA                  |   117 |  3744 |    28   (0)| 00:00:01 |
    |  76 |              NESTED LOOPS               |                            |   466 | 28892 |   114   (0)| 00:00:02 |
    |  77 |               NESTED LOOPS              |                            |     4 |   120 |     2   (0)| 00:00:01 |
    |* 78 |                INDEX UNIQUE SCAN        | PK_TABLEDEF                |     1 |     4 |     0   (0)| 00:00:01 |
    |  79 |                VIEW                     |                            |     4 |   104 |     2   (0)| 00:00:01 |
    |  80 |                 TABLE ACCESS FULL       | SYS_TEMP_0FD9D9B52_2EBE182 |     4 |   388 |     2   (0)| 00:00:01 |
    |* 81 |               INDEX RANGE SCAN          | XF11_DATA_LE_HB            |   117 |       |    12   (0)| 00:00:01 |
    |  82 |             VIEW                        |                            |    27 | 54189 |     2   (0)| 00:00:01 |
    |  83 |              TABLE ACCESS FULL          | SYS_TEMP_0FD9D9B54_2EBE182 |    27 |  1269 |     2   (0)| 00:00:01 |
    |  84 |            TABLE ACCESS BY INDEX ROWID  | TABLECELL                  |     1 |    11 |     1   (0)| 00:00:01 |
    |* 85 |             INDEX UNIQUE SCAN           | XF1_TBLCEL_DATA            |     1 |       |     0   (0)| 00:00:01 |
    |* 86 |           TABLE ACCESS BY INDEX ROWID   | CELLDEF                    |     1 |    11 |     1   (0)| 00:00:01 |
    |* 87 |            INDEX UNIQUE SCAN            | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  88 |        TABLE ACCESS BY INDEX ROWID      | CELLDEF                    |     1 |    33 |     1   (0)| 00:00:01 |
    |* 89 |         INDEX UNIQUE SCAN               | PK_CELLDEF                 |     1 |       |     0   (0)| 00:00:01 |
    |  90 |       BUFFER SORT                       |                            |     1 |    17 |   122   (2)| 00:00:02 |
    |  91 |        VIEW                             |                            |     1 |    17 |     2   (0)| 00:00:01 |
    |  92 |         TABLE ACCESS FULL               | SYS_TEMP_0FD9D9B53_2EBE182 |     1 |    10 |     2   (0)| 00:00:01 |
    |  93 |      TABLE ACCESS BY INDEX ROWID        | APPUSAGEACCESS             |     1 |    17 |     1   (0)| 00:00:01 |
    |* 94 |       INDEX UNIQUE SCAN                 | AK_APPUSAGEACCESS          |     1 |       |     0   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id):
       3 - filter("TAXGROUP_DELETE_IND"='N' AND "TAXGROUP_ACTIVE_IND"='A')
       4 - access("TAXGROUP_CODE"='TAXGROUP2')
      13 - filter("TGI"."HYPERIONBASE_ID" IS NOT NULL)
      14 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
      15 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID" AND "TGI"."HYPERIONBASE_ID"="OU"."HYPERIONBASE_ID")
      21 - filter("TGI"."HYPERIONBASE_ID" IS NULL)
      22 - access("TG"."TAXGROUP_CODE"="TGI"."TAXGROUP_CODE")
      23 - access("TGI"."LEGALENTITY_ID"="OU"."ORGUNIT_ID")
      25 - access("APPUSAGE_CODE"='CONSOLIDATION')
      27 - filter("FD"."FIELDDATA_VALUE"=CASE INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),':') WHEN 0
                  THEN "FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415) ELSE
                  SUBSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(164415),1,INSTR("FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"(16441
                  5),':')-1) END )
      33 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      39 - filter("FDK"."RN"=1)
      40 - filter(ROW_NUMBER() OVER ( PARTITION BY "CD"."CELLDEF_ID","FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"
                  ."FIELDDATA_GROUP_SEQUENCE") ORDER BY "FD"."FIELDDATA_GROUP_SEQUENCE")<=1)
      44 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
                  "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
      45 - filter("FD"."FIELDDATA_DELETE_IND"='N')
      48 - access("TD"."TABLEDEF_ID"=2265)
      51 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      55 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
      56 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_KEY_IND"='Y')
      57 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
      61 - access("FDK"."CELLDEF_ID"="CD"."CELLDEF_ID")
      66 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")
      74 - access("GRS"."FD_GRPSEQ"="FD"."FIELDDATA_PARENT_ROW_SEQUENCE" AND
                  "GRS"."PRS_KEY"="FEDTAXPK_PKG"."GETFIELDDATAGROUPSEQKEY"("FD"."FIELDDATA_PARENT_ROW_SEQUENCE"))
      75 - filter("FD"."FIELDDATA_DELETE_IND"='N')
      78 - access("TD"."TABLEDEF_ID"=2265)
      81 - access("LE_HB"."LEGALENTITY_ID"="FD"."LEGALENTITY_ID" AND
                  "LE_HB"."HYPERIONBASE_ID"="FD"."HYPERIONBASE_ID")
      85 - access("FD"."FIELDDATA_ID"="TC"."FIELDDATA_ID")
      86 - filter("CD"."TABLEDEF_ID"=2265 AND "CD"."CELLDEF_ADJUSTABLE_IND"='Y')
      87 - access("TC"."CELLDEF_ID"="CD"."CELLDEF_ID")
      89 - access("FDA"."CELLDEF_ID"="CD"."CELLDEF_ID")
      94 - access("AUA"."APPUSAGE_CODE"="AU"."APPUSAGE_CODE" AND "CD"."CELLDEF_ID"="AUA"."CELLDEF_ID")

Maybe you are looking for

  • Reg: Parameterized Popup with Button

    Hi team, I have a reuiqrement as below : Table Region : Header Data For each header i have a link to PopUP. In the PopUP user will enter all the line information. To save the line information i have use normal button bean and i was able to save data.

  • Server admin doesn't display info

    I'm experiencing slow network logons for our 10.6.8 Mac Mini server (circa 2009).  I can't get server admin to display any info - the fields are blank - both logged on locally and remotely.  I looked in some logs, but don't know which ones are useful

  • Slowness with thunderbird, not responding

    Very slow responding. Not responding pops-up on screen Often says not connected.

  • Presenter 7 won't publish to PDF

    I have Adobe Presenter 7 ( 7.0.2 build 7464) and I have a 22 slide 6MB PowerPoint2007 presentation. No animations or builds. Presenter publishes to SWF fine. But when I publish to PDF, I get "Adobe Presenter cannot publish this presentation. Unknown

  • IPhone Bluetooth Headset Not Working Now

    My Bluetooth Headset was working fine last night. I charged in completely over night, and when I went to use it on my handy dandy iPhone 3G, I could not hear anything. It showed on my phone as connected and I could hear the beeping when I pressed the