Query runs slower when using variables & faster when using hard coded value

Hi,
My query runs slower when i use variables but it runs faster when i use hard coded values. Why it is behaving like this ?
My query is in cursor definition in a procedure. Procedure runs faster when using hard coded valus and slower when using variables.
Can anybody help me out there?
Thanks in advance.

Hi,
Thanks for ur reply.
here is my code with Variables:
Procedure populateCountryTrafficDetails(pWeekStartDate IN Date , pCountry IN d_geography.country_code%TYPE) is
startdate date;
AR_OrgId number(10);
Cursor cTraffic is
Select
          l.actual_date, nvl(o.city||o.zipcode,'Undefined') Site,
          g.country_code,d.customer_name, d.customer_number,t.contrno bcn,
          nvl(r.dest_level3,'Undefined'),
          Decode(p.Product_code,'820','821','821','821','801') Product_Code ,
          Decode(p.Product_code,'820','Colt Voice Connect','821','Colt Voice Connect','Colt Voice Line') DProduct,
          sum(f.duration),
          sum(f.debamount_eur)
          from d_calendar_date l,
          d_geography g,
          d_customer d, d_contract t, d_subscriber s,
          d_retail_dest r, d_product p,
          CPS_ORDER_DETAILS o,
          f_retail_revenue f
          where
          l.date_key = f.call_date_key and
          g.geography_key = f.geography_key and
          r.dest_key = f.dest_key and
          p.product_key = f.product_key and
          --c.customer_key = f.customer_key and
          d.customer_key = f.customer_key and
          t.contract_key = f.contract_key and
          s.SUBSCRIBER_KEY = f.SUBSCRIBER_KEY and
          o.org_id(+) = AR_OrgId and
          g.country_code = pCountry and
          l.actual_date >= startdate and
          l.actual_date <= (startdate + 90) and
          o.cli(+) = s.area_subno and
          p.product_code in ('800','801','802','804','820','821')
          group by
          l.actual_date,
          o.city||o.zipcode, g.country_code,d.customer_name, d.customer_number,t.contrno,r.dest_level3, p.product_code;
Type CountryTabType is Table of country_traffic_details.Country%Type index by BINARY_INTEGER;
Type CallDateTabType is Table of country_traffic_details.CALL_DATE%Type index by BINARY_INTEGER;
Type CustomerNameTabType is Table of Country_traffic_details.Customer_name%Type index by BINARY_INTEGER;
Type CustomerNumberTabType is Table of Country_traffic_details.Customer_number%Type index by BINARY_INTEGER;
Type BcnTabType is Table of Country_traffic_details.Bcn%Type index by BINARY_INTEGER;
Type DestinationTypeTabType is Table of Country_traffic_details.DESTINATION_TYPE%Type index by BINARY_INTEGER;
Type ProductCodeTabType is Table of Country_traffic_details.Product_Code%Type index by BINARY_INTEGER;
Type ProductTabType is Table of Country_traffic_details.Product%Type index by BINARY_INTEGER;
Type DurationTabType is Table of Country_traffic_details.Duration%Type index by BINARY_INTEGER;
Type DebamounteurTabType is Table of Country_traffic_details.DEBAMOUNTEUR%Type index by BINARY_INTEGER;
Type SiteTabType is Table of Country_traffic_details.Site%Type index by BINARY_INTEGER;
CountryArr CountryTabType;
CallDateArr CallDateTabType;
Customer_NameArr CustomerNameTabType;
CustomerNumberArr CustomerNumberTabType;
BCNArr BCNTabType;
DESTINATION_TYPEArr DESTINATIONTYPETabType;
PRODUCT_CODEArr PRODUCTCODETabType;
PRODUCTArr PRODUCTTabType;
DurationArr DurationTabType;
DebamounteurArr DebamounteurTabType;
SiteArr SiteTabType;
Begin
     startdate := (trunc(pWeekStartDate) + 6) - 90;
     Exe_Pos := 1;
     Execute Immediate 'Truncate table country_traffic_details';
     dropIndexes('country_traffic_details');
     Exe_Pos := 2;
     /* Set org ID's as per AR */
     case (pCountry)
     when 'FR' then AR_OrgId := 81;
     when 'AT' then AR_OrgId := 125;
     when 'CH' then AR_OrgId := 126;
     when 'DE' then AR_OrgId := 127;
     when 'ES' then AR_OrgId := 123;
     when 'IT' then AR_OrgId := 122;
     when 'PT' then AR_OrgId := 124;
     when 'BE' then AR_OrgId := 132;
     when 'IE' then AR_OrgId := 128;
     when 'DK' then AR_OrgId := 133;
     when 'NL' then AR_OrgId := 129;
     when 'SE' then AR_OrgId := 130;
     when 'UK' then AR_OrgId := 131;
     else raise_application_error (-20003, 'No such Country Code Exists.');
     end case;
     Exe_Pos := 3;
dbms_output.put_line('3: '||to_char(sysdate, 'HH24:MI:SS'));
     populateOrderDetails(AR_OrgId);
dbms_output.put_line('4: '||to_char(sysdate, 'HH24:MI:SS'));
     Exe_Pos := 4;
     Open cTraffic;
     Loop
     Exe_Pos := 5;
     CallDateArr.delete;
FETCH cTraffic BULK COLLECT
          INTO CallDateArr, SiteArr, CountryArr, Customer_NameArr,CustomerNumberArr,
          BCNArr,DESTINATION_TYPEArr,PRODUCT_CODEArr, PRODUCTArr, DurationArr, DebamounteurArr LIMIT arraySize;
          EXIT WHEN CallDateArr.first IS NULL;
               Exe_pos := 6;
                    FORALL i IN 1..callDateArr.last
                    insert into country_traffic_details
                    values(CallDateArr(i), CountryArr(i), Customer_NameArr(i),CustomerNumberArr(i),
                    BCNArr(i),DESTINATION_TYPEArr(i),PRODUCT_CODEArr(i), PRODUCTArr(i), DurationArr(i),
                    DebamounteurArr(i), SiteArr(i));
                    Exe_pos := 7;
dbms_output.put_line('7: '||to_char(sysdate, 'HH24:MI:SS'));
     EXIT WHEN ctraffic%NOTFOUND;
END LOOP;
     commit;
Exe_Pos := 8;
          commit;
dbms_output.put_line('8: '||to_char(sysdate, 'HH24:MI:SS'));
          lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_CUSTNO ON country_traffic_details (CUSTOMER_NUMBER)';
          execDDl(lSql);
          lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_BCN ON country_traffic_details (BCN)';
          execDDl(lSql);
          lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_PRODCD ON country_traffic_details (PRODUCT_CODE)';
          execDDl(lSql);
          lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_SITE ON country_traffic_details (SITE)';
          execDDl(lSql);
          lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_DESTYP ON country_traffic_details (DESTINATION_TYPE)';
          execDDl(lSql);
          Exe_Pos:= 9;
dbms_output.put_line('9: '||to_char(sysdate, 'HH24:MI:SS'));
Exception
     When Others then
     raise_application_error(-20003, 'Error in populateCountryTrafficDetails at Position: '||Exe_Pos||' The Error is '||SQLERRM);
End populateCountryTrafficDetails;
In the above procedure if i substitute the values with hard coded values i.e. AR_orgid = 123 & pcountry = 'Austria' then it runs faster.
Please let me know why it is so ?
Thanks in advance.

Similar Messages

  • Query of query - running slower on 64 bit CF than 32 bit CF

    Greetings...
    I am seeing behavior where pages that use query-of-query run slower on 64-bit Coldfusion 9.01 than on 32-bit Coldfusion 9.01.
    My server specs are : dual processer virtual machine, 4 GIG ram, Windows 2008 Datacenter Server r2 64-bit, Coldfusion 9.01. Note that the coldfusion is literally "straight out of the box", and is using all default settings - the only thing I configured in CF is a single datasource.
    The script I am using to benchmark this runs a query that returns 20,000 rows with fields id, firstname, lastname, email, city, datecreated. I then loop through all 20,000 records, and for each record, I do a query-of-query (on the same master query) to find any other record where the lastname matches that of the record I'm currently on. Note that I'm only interested in using this process for comparative benchmarking purposes, and I know that the process could be written more efficiently.
    Here are my observed execution times for both 64-bit and 32-bit Coldfusion (in seconds) on the same machine.
    64 bit CF 9.01: 63,49,52,52,52,48,50,49,54 (avg=52 seconds)
    32 bit CF 9.01: 47,45,43,43,45,41,44,42,46 (avg=44 seconds)
    It appears from this that 64-bit CF performs worse than 32-bit CF when doing query-of-query operations. Has anyone made similar observations, and is there any way I can tune the environment to improve 64 bit performance?
    Thanks for any help you can provide!
    By the way, here's the code that is generating these results:
    <!--- Allrecs query returns 20000 rows --->
    <CFQUERY NAME="ALLRECS" DATASOURCE="MyDsn">
        SELECT * FROM MyTBL
    </CFQUERY>
    <CFLOOP QUERY="ALLRECS">
        <CFQUERY NAME="SAMELASTNAME" DBTYPE="QUERY">
            SELECT * FROM ALLRECS
            WHERE LN=<CFQUERYPARAM VALUE="#ALLRECS.LN#" CFSQLTYPE="CF_SQL_VARCHAR">
            AND ID<><CFQUERYPARAM VALUE="#AllRecs.ID#" CFSQLTYPE="CF_SQL_INTEGER">
        </CFQUERY>
        <CFIF SameLastName.RecordCount GT 20>
            #AllRecs.LN#, #AllRecs.FN# : #SameLastName.RecordCount# other records with same lastname<BR>
        </CFIF>
    </CFLOOP>

    BoBear2681 wrote:
    ..follow-up: ..Thanks for the follow-up. I'll be interested to hear the progress (or otherwise, as the case may be).
    As an aside. I got sick of trying to deal with Clip because it could only handle very small Clip sizes. AFAIR it was 1 second of 44.1 KHz stereo. From that point, I developed BigClip.
    Unfortunately BigClip as it stands is even less able to fulfil your functional requirement than Clip, in that only one BigClip can be playing at a time. Further, it can be blocked by other sound applications (e.g. VLC Media Player, Flash in a web page..) or vice-versa.

  • How could I replace hard coded value in my sql query with constant value?

    Hi all,
    Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
    PROCEDURE class_by_day_get_bin_data
         in_report_parameter_id   IN   NUMBER,
         in_site_id               IN   NUMBER,
         in_start_date_time       IN   TIMESTAMP,
         in_end_date_time         IN   TIMESTAMP,
         in_report_level_min      IN   NUMBER,
         in_report_level_max      IN   NUMBER
    IS
      bin_period_length   NUMBER(6,0); 
    BEGIN
      SELECT MAX(period_length)
         INTO bin_period_length
        FROM bin_data
         JOIN site_to_data_source_lane_v
           ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
         JOIN bin_types
           ON bin_types.bin_type = bin_data.bin_type 
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
       SELECT site_to_data_source_lane_v.site_id,
             site_to_data_source_lane_v.site_lane_id,
             site_to_data_source_lane_v.site_direction_id,
             site_to_data_source_lane_v.site_direction_name,
             bin_data_set.start_date_time,
             bin_data_set.end_date_time,
             bin_data_value.bin_id,
             bin_data_value.bin_value
        FROM bin_data
        JOIN bin_data_set
          ON bin_data.bin_serial = bin_data_set.bin_serial
        JOIN bin_data_value
          ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
        JOIN site_to_data_source_lane_v
             ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
            AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) lane_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'LANE'
                  AND report_parameters.report_parameter_name  = 'LANE'
             ) report_lanes
          ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) class_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'CLASS'
                  AND report_parameters.report_parameter_name  = 'CLASS'
             ) report_classes
          ON bin_data_value.bin_id = report_classes.class_id
        JOIN edr_rpt_tmp_inclusion_table
          ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data_set.start_date_time >= in_start_date_time
         AND bin_data_set.start_date_time <  in_end_date_time
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       =  bin_period_length;
    END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
    bin_data.bin_type            =  2But I dont want any hard coded number or string in the query.
    How could I replace it?
    I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
    bin_type     CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
    Thanks.
    Edited by: user10641405 on May 29, 2009 1:38 PM

    Declare the constant inside the procedure.
    PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
                                        in_site_id             IN NUMBER,
                                        in_start_date_time     IN TIMESTAMP,
                                        in_end_date_time       IN TIMESTAMP,
                                        in_report_level_min    IN NUMBER,
                                        in_report_level_max    IN NUMBER) IS
      bin_period_length NUMBER(6, 0);
      v_bin_type     CONSTANT NUMBER := 2;
    BEGIN
      SELECT MAX(period_length)
        INTO bin_period_length
        FROM bin_data
        JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                           site_to_data_source_lane_v.data_source_id
        JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time >=
             in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time <
             in_end_date_time + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type = v_bin_type
         AND bin_data.period_length <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
      INSERT INTO edr_class_by_day_bin_data
        (site_id,
         site_lane_id,
         site_direction_id,
         site_direction_name,
         bin_start_date_time,
         bin_end_date_time,
         bin_id,
         bin_value)
        SELECT site_to_data_source_lane_v.site_id,
               site_to_data_source_lane_v.site_lane_id,
               site_to_data_source_lane_v.site_direction_id,
               site_to_data_source_lane_v.site_direction_name,
               bin_data_set.start_date_time,
               bin_data_set.end_date_time,
               bin_data_value.bin_id,
               bin_data_value.bin_value
          FROM bin_data
          JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
          JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
                                 bin_data_value.bin_data_set_serial
          JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                             site_to_data_source_lane_v.data_source_id
                                         AND bin_data_set.lane =
                                             site_to_data_source_lane_v.data_source_lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'LANE'
                   AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
                                                                                         report_lanes.lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'CLASS'
                   AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
                                                                                            report_classes.class_id
          JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
                                              TRUNC(edr_rpt_tmp_inclusion_table.date_time)
         WHERE site_to_data_source_lane_v.site_id = in_site_id
           AND bin_data.start_date_time >=
               in_start_date_time - numtodsinterval(1, 'DAY')
           AND bin_data.start_date_time <
               in_end_date_time + numtodsinterval(1, 'DAY')
           AND bin_data_set.start_date_time >= in_start_date_time
           AND bin_data_set.start_date_time < in_end_date_time
           AND bin_data.bin_type = v_bin_type
           AND bin_data.period_length = bin_period_length;
    END class_by_day_get_bin_data;

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • SECURITY query running slow with Prompts!!

    Hello All,
    Version: PeopleSoft HRMS 9 with PeopleTools 8.49.09
    DB Version: 10.2.0.3 (Oracle)
    My client is running a security query, given below, with and without prompts. Without prompts it is completing in 35 seconds but with prompts (even if the values in the prompts are blank!), the query is taking more than 4-5 hours but not completing!!
    SELECT /*+ OPT_PARAM('_optimizer_mjc_enabled', 'false')
    opt_param('_optimizer_cartesian_enabled', 'false') opt_param('optimizer_index_caching', 0) opt_param('optimizer_index_cost_adj', 0)*/ B.OPRID, A.EMPLID, A.PWCUK_LEGACY_ID, A.NAME, A.EMPL_STATUS, A.EMPL_CLASS,
    to_char(to_date( TO_CHAR(A.HIRE_DT, 'YYYY-MM-DD'), 'yyyy-mm-dd'), 'dd/mm/yyyy'),
    to_char(to_date(decode( TO_CHAR(A.REHIRE_DT, 'YYYY-MM-DD'), '',
    TO_CHAR(A.HIRE_DT, 'YYYY-MM-DD'), TO_CHAR(A.REHIRE_DT, 'YYYY-MM-DD')), 'yyyy-mm-dd'), 'dd/mm/yyyy'),
    to_char(to_date( TO_CHAR(A.TERMINATION_DT, 'YYYY-MM-DD'), 'yyyy-mm-dd'), 'dd/mm/yyyy'), A.DEPTID, A.DEPT_DESCR, A.PWCUK_BUSINESSUNIT, A.PWCUK_BU_DESCR, A.PWCUK_SUBREGION, A.PWCUK_SR_DESCR,
    A.PWCUK_REGION, A.PWCUK_R_DESCR, B.ROWSECCLASS, E.CLASSDEFNDESC, C.ROLENAME, D.DESCR,
    Case C.ROLENAME When 'UK_OTG_Query_Access' then 'Y' When 'UK_Self_Service_Query_Access' then 'Y' When 'UK_Prtner_Affairs_Query_Acces' then 'Y' When 'UK_SelfServ_Sens_Basic_Query' then 'Y' When 'UK_ESC_Extra_Query_Access' then 'Y' When 'UK_BCI_Query_Access' then 'Y' When 'UK_Self_Service_Non_Sens_Q Acc' then 'Y' Else 'N' END, TO_CHAR(A.EFFDT, 'YYYY-MM-DD'),
    TO_CHAR(A.EFFDT, 'YYYY-MM-DD'), D.ROLENAME FROM PS_PWCUK_EMP_C_VW A, PS_PERS_SRCH_QRY A1, PSOPRDEFN B, PS_ROLEU SER_VW C, PSROLEDEFN D, PSCLASSDEFN E WHERE A.EMPLID = A1.EMPLID
    AND A1.OPRID = 'kcooper001a' AND ( B.OPRID = A.PWCE_GUID AND B.OPRID = C.OPRID AND C.ROLENAME NOT IN ('Orbit User', 'PWCUK_LOS_ADMIN_PLANNER', 'Query Designer', 'Query User', 'PWCE_EMEA_AUDIT_RLE_NO_BSE_TBL', 'PWCE_REPORT_DIST', 'EOPP_USER', 'PAPP_USER', 'PWCUK_XMLP_REPORT_DEVELOPER', 'GBR_PEOPLE_MANAGER_CONFIG_UPD', 'PWCUK_EX_EMPLOYEE', 'ReportSuperUser', 'PWCE JOBCODE LOAD UTILITY',
    'PWCE EMPLOYEE RVW LOAD ACCESS', 'PwCE Bonus Upload Access', 'GBR_EP_SYSADMIN') AND ( C.ROLENAME NOT LIKE 'PWCUK_EP%' OR C.ROLENAME = 'PWCUK_EP_ADMIN') AND C.ROLENAME NOT LIKE 'PWCUK_SP%' AND C.ROLENAME NOT LIKE 'GBR_PMGR%' AND 0 < INSTR(:1, decode(trim(:2), null, ' ', B.OPRID)) AND 0 < INSTR(:3, decode(trim(:4), null, ' ', B.EMPLID)) AND 0 < INSTR(:5, decode(trim(:6), null, ' ', A.PWCUK_LEGACY_ID)) A
    ND 0 < INSTR(:7, decode(trim(:8), null, ' ', C.ROLENAME)) AND 0 < INSTR(:9, decode(trim(:10), null, ' ', E.CLASSID)) AND C.ROLENAME = D.ROLENAME AND E.CLASSID = B.ROWSECCLASS ) ORDER BY 4, 20Below are some more useful information I have gathered from DB level for this query:
    +--------------------------------------------------------------------------------------------------+
    |Plan HV     Min Snap  Max Snap  Execs       LIO            PIO            CPU         Elapsed     |
    +--------------------------------------------------------------------------------------------------+
    |770792495   39602     39747     5           1,181,648,326  6,823          7,433.93    7,481.60    |
    +--------------------------------------------------------------------------------------------------+
    ========== PHV = 770792495==========
    First seen from "10/19/12 10:00:44" (snap #39602)
    Last seen from  "10/25/12 11:00:28" (snap #39747)
    Execs          LIO            PIO            CPU            Elapsed
    =====          ===            ===            ===            =======
    5              1,181,648,326  6,823          7,433.93       7,481.60
    Plan hash value: 770792495
    | Id  | Operation                           | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                    |                    |       |       |    35 (100)|          |
    |   1 |  SORT ORDER BY                      |                    |     1 |   645 |    35   (6)| 00:00:01 |
    |   2 |   NESTED LOOPS                      |                    |     1 |   645 |    34   (3)| 00:00:01 |
    |   3 |    NESTED LOOPS                     |                    |     6 |  1122 |    10  (10)| 00:00:01 |
    |   4 |     NESTED LOOPS                    |                    |     1 |   165 |     5   (0)| 00:00:01 |
    |   5 |      NESTED LOOPS                   |                    |     1 |   122 |     4   (0)| 00:00:01 |
    |   6 |       NESTED LOOPS                  |                    |     1 |    81 |     3   (0)| 00:00:01 |
    |   7 |        NESTED LOOPS                 |                    |   552 | 29256 |     2   (0)| 00:00:01 |
    |   8 |         INDEX FULL SCAN             | PSAPSROLEUSER      |   550 | 15950 |     1   (0)| 00:00:01 |
    |   9 |         TABLE ACCESS BY INDEX ROWID | PS_ROLEXLATOPR     |     1 |    24 |     1   (0)| 00:00:01 |
    |  10 |          INDEX UNIQUE SCAN          | PS_ROLEXLATOPR     |     1 |       |     1   (0)| 00:00:01 |
    |  11 |        TABLE ACCESS BY INDEX ROWID  | PSOPRDEFN          |     1 |    28 |     1   (0)| 00:00:01 |
    |  12 |         INDEX UNIQUE SCAN           | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    |  13 |       TABLE ACCESS BY INDEX ROWID   | PSCLASSDEFN        |     1 |    41 |     1   (0)| 00:00:01 |
    |  14 |        INDEX UNIQUE SCAN            | PS_PSCLASSDEFN     |     1 |       |     1   (0)| 00:00:01 |
    |  15 |      TABLE ACCESS BY INDEX ROWID    | PSROLEDEFN         |     1 |    43 |     1   (0)| 00:00:01 |
    |  16 |       INDEX UNIQUE SCAN             | PS_PSROLEDEFN      |     1 |       |     1   (0)| 00:00:01 |
    |  17 |     VIEW                            | PS_PERS_SRCH_QRY   |   483 | 10626 |     5  (20)| 00:00:01 |
    |  18 |      SORT UNIQUE                    |                    |   483 | 62790 |     5  (20)| 00:00:01 |
    |  19 |       NESTED LOOPS                  |                    |   483 | 62790 |     4   (0)| 00:00:01 |
    |  20 |        NESTED LOOPS                 |                    |   483 | 49749 |     3   (0)| 00:00:01 |
    |  21 |         NESTED LOOPS                |                    |     1 |    67 |     2   (0)| 00:00:01 |
    |  22 |          TABLE ACCESS BY INDEX ROWID| PSOPRDEFN          |     1 |    40 |     1   (0)| 00:00:01 |
    |  23 |           INDEX UNIQUE SCAN         | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    |  24 |          TABLE ACCESS BY INDEX ROWID| PS_SJT_OPR_CLS     |     1 |    27 |     1   (0)| 00:00:01 |
    |  25 |           INDEX RANGE SCAN          | PS_SJT_OPR_CLS     |     1 |       |     1   (0)| 00:00:01 |
    |  26 |         TABLE ACCESS BY INDEX ROWID | PS_SJT_CLASS_ALL   |   482 | 17352 |     1   (0)| 00:00:01 |
    |  27 |          INDEX RANGE SCAN           | PS_SJT_CLASS_ALL   |  1158 |       |     1   (0)| 00:00:01 |
    |  28 |        INDEX RANGE SCAN             | PS_SJT_PERSON      |     1 |    27 |     1   (0)| 00:00:01 |
    |  29 |    VIEW                             | PS_PWCUK_EMP_C_VW  |     1 |   458 |     4   (0)| 00:00:01 |
    |  30 |     UNION ALL PUSHED PREDICATE      |                    |       |       |            |          |
    |  31 |      TABLE ACCESS BY INDEX ROWID    | PS_PWCUK_EMPLOYEES |     1 |   169 |     1   (0)| 00:00:01 |
    |  32 |       INDEX RANGE SCAN              | PS_PWCUK_EMPLOYEES |     1 |       |     1   (0)| 00:00:01 |
    |  33 |      FILTER                         |                    |       |       |            |          |
    |  34 |       NESTED LOOPS OUTER            |                    |     1 |   220 |     3   (0)| 00:00:01 |
    |  35 |        NESTED LOOPS OUTER           |                    |     1 |   208 |     2   (0)| 00:00:01 |
    |  36 |         TABLE ACCESS BY INDEX ROWID | PS_PWCUK_EX_EMPLS  |     1 |   161 |     1   (0)| 00:00:01 |
    |  37 |          INDEX RANGE SCAN           | PS_PWCUK_EX_EMPLS  |     1 |       |     1   (0)| 00:00:01 |
    |  38 |         TABLE ACCESS BY INDEX ROWID | PS_PWCE_EP_ROLES   |     1 |    47 |     1   (0)| 00:00:01 |
    |  39 |          INDEX RANGE SCAN           | PS_PWCE_EP_ROLES   |     1 |       |     1   (0)| 00:00:01 |
    |  40 |        INDEX RANGE SCAN             | PS_PWCUK_EMPLOYEES |     1 |    12 |     1   (0)| 00:00:01 |
    |  41 |       SORT AGGREGATE                |                    |     1 |    23 |            |          |
    |  42 |        INDEX RANGE SCAN             | PS_PWCE_EP_ROLES   |     1 |    23 |     1   (0)| 00:00:01 |
                                                  Summary Execution Statistics Over Time
                                                                                  Avg                 Avg
    Snapshot                          Avg LIO             Avg PIO          CPU (secs)      Elapsed (secs)
    Time            Execs            Per Exec            Per Exec            Per Exec            Per Exec
    19-OCT 10:00        1      374,309,812.00            1,469.00            2,286.32            2,291.32
    25-OCT 10:00        3       86,033,085.00            1,567.67              543.68              546.11
    25-OCT 11:00        1      549,239,259.00              651.00            3,516.56            3,551.96
    avg                        336,527,385.33            1,229.22            2,115.52            2,129.80
    sum                 5
                                                  Per-Plan Execution Statistics Over Time
                                                                                             Avg                 Avg
          Plan Snapshot                          Avg LIO             Avg PIO          CPU (secs)      Elapsed (secs)
    Hash Value Time            Execs            Per Exec            Per Exec            Per Exec            Per Exec
    770792495 19-OCT 10:00        1      374,309,812.00            1,469.00            2,286.32            2,291.32
               25-OCT 10:00        3       86,033,085.00            1,567.67              543.68              546.11
               25-OCT 11:00        1      549,239,259.00              651.00            3,516.56            3,551.96
    avg                                   336,527,385.33            1,229.22            2,115.52            2,129.80
    sum                            5I'm not at all proficient in PeopleSoft.
    Please advice how we can get faster runs for this query.
    Note: We have already checked all other possibilities, like network, application, web services, etc, and they look normal.
    Thanks,
    Suddhasatwa

    If the hints are there only for the "cost", then I'm sorry to say, but they are useless. Did you say that was not efficient to the Oracle Support ?
    I asked earlier if that query already ran in a reasonnable time, is it the case, or always took that time ? Is it a change of behaviour after a db upgrade ?
    Have you tried to work with AWR snapshots with a short gap in between ? I mean between the AWR snapshots (every 15 minutes or so), not between the runs of the query.
    If there's no values for the bind variables, I assume this is what you mean when you said "no prompts", then Oracle can go much faster because of the few (or no?) data repartition to retrieve.
    However, when given values to some (all?) of the bind variables, then all the problem will be on the data repartition. That's why I was asking how you gathered statistics on the involved objects, in other words, the histograms may be wrong somehow.
    There's a lot of litterature on this, have a look to the Jonathan Lewis blog for more information.
    Anyway, I think there's not enough information here and does not look easy to work on it in that state from the other side of the network.
    Nicolas.

  • Query Runs Slow in Forms

    I have a search query that uses the substr function to fetch some records.The query runs fine when executing SQL*PLUS or any other client like PL/SQL Developer. The same query is dead slow in Forms interface.
    Can anyone suggest?

    Both the query use the substr function. Here is the query. only highlighted IF condition evaluates to true.
         V_SEARCH VARCHAR2(255);
    BEGIN
         --- SET MOBILENO
         IF :CONTROL.MOBILENO IS NOT NULL AND LENGTH(:CONTROL.MOBILENO) <= 7 THEN
              IF :CONTROL.QRY_MOBILENO = 'P' THEN
                   V_SEARCH := V_SEARCH||' AND substr(MOBILENO,5,7) = '||''''||:CONTROL.MOBILENO||'''';
              ELSIF :CONTROL.QRY_MOBILENO = 'S' THEN
                   V_SEARCH := V_SEARCH||' AND substr(MOBILENO,5,7) LIKE '||''''||:CONTROL.MOBILENO||'%''';     
              ELSIF :CONTROL.QRY_MOBILENO = 'E' THEN
                   V_SEARCH := V_SEARCH||' AND substr(MOBILENO,5,7) LIKE '||'''%'||:CONTROL.MOBILENO||'''';     
              ELSIF :CONTROL.QRY_MOBILENO = 'C' THEN
                   V_SEARCH := V_SEARCH||' AND substr(MOBILENO,5,7) LIKE '||'''%'||:CONTROL.MOBILENO||'%''';     
              END IF;     
         ELSIF :CONTROL.MOBILENO IS NOT NULL AND LENGTH(:CONTROL.MOBILENO) <= 11 THEN
              IF :CONTROL.QRY_MOBILENO = 'P' THEN
                   V_SEARCH := V_SEARCH||' AND MOBILENO = '||''''||:CONTROL.MOBILENO||'''';
              ELSIF :CONTROL.QRY_MOBILENO = 'S' THEN
                   V_SEARCH := V_SEARCH||' AND MOBILENO LIKE '||''''||:CONTROL.MOBILENO||'%''';     
              ELSIF :CONTROL.QRY_MOBILENO = 'E' THEN
                   V_SEARCH := V_SEARCH||' AND MOBILENO LIKE '||'''%'||:CONTROL.MOBILENO||'''';     
              ELSIF :CONTROL.QRY_MOBILENO = 'C' THEN
                   V_SEARCH := V_SEARCH||' AND MOBILENO LIKE '||'''%'||:CONTROL.MOBILENO||'%''';     
              END IF;     
         END IF;     
         --NDC
         IF :CONTROL.NDC IS NOT NULL THEN
                   V_SEARCH := V_SEARCH||' AND SUBSTR(MOBILENO,1,4) = '||''''||:CONTROL.NDC||'''';
         END IF;
         --Number Type
         IF :CONTROL.number_type IS NOT NULL THEN
                   V_SEARCH := V_SEARCH||' AND number_type = '||''''||:CONTROL.number_type||'''';
         END IF;     
         --Status
         IF :CONTROL.status IS NOT NULL THEN
                   V_SEARCH := V_SEARCH||' AND status = '||''''||substr(:CONTROL.status,1,1)||'''';
         END IF;     
         --CITY
         IF :CONTROL.CITY IS NOT NULL THEN
                   V_SEARCH := V_SEARCH||' AND LOC_NAME = '||''''||:CONTROL.CITY||'''';
         END IF;     
         --REGION
         IF :CONTROL.REGION IS NOT NULL THEN
                   V_SEARCH := V_SEARCH||' AND COMM_REGION = '||''''||:CONTROL.REGION||'''';
         END IF;     
         --RECYCLE FLAG
         IF :CONTROL.RECYCLE_FLAG <> 'A' THEN
              V_SEARCH := V_SEARCH||' AND RECYCLE_FLAG = '||''''||:CONTROL.RECYCLE_FLAG||'''';
         END IF;
         --EXECUTE QUERY
         V_SEARCH := SUBSTR(V_SEARCH,5);     
    GO_BLOCK('NO_INVENTORY');
         SET_BLOCK_PROPERTY('NO_INVENTORY',ONETIME_WHERE,V_SEARCH);
         EXECUTE_QUERY;
    END;

  • Query running slow after 1000 rows in oracle

    Hi.
    I have one query which is fetching miln of rows.. the query runs very fast till 1000 to 1500 records after that it run very slow. Can you please help ,what could be the reason?
    Thanks

    831269 wrote:
    I have one query which is fetching miln of rows.. Why are you fetching that many rows? What is your client code going to do with a million rows? And why do you expect this to be fast? A million rows worth of I/O has to be done by Oracle (that will likely be mostly from disk and not buffer cache). That million rows has to be copied from the Oracle's SGA to client memory. If your client is PL/SQL code, that will be copied into the PGA. If your client is external, then that copy has to happen across platform boundaries and the network too.
    Then your code churns away on processing a million rows... doing what exactly? That "+what+" will need to be done once per row, for a million times. If it takes 10ms per row, that means almost 3h of client processing time.
    Fetching that many rows..? Often a design and coding mistake. Always an exception to the rule. Will never be "fast".
    And scalability and performance need to be addressed by re-examining the requirements, optimising the design that necessitates fetching that many rows, and using techniques such as parallel processing and thread safe code design.

  • Query Running Slow due to nvl.

    I have a Cursor Based query written as a Procedure.when i invoke that procedure,I found that two condition statements are the ones which is making my query run very slow.
    Since this has been handled with NVL statements query is running very slow.Currently query takes more than one hour to execute.if i comment these two statements and run the query,it takes ony 20 secs to complete.
    Those two statements are
    'and rbsa.batch_source_id = nvl(p_source_type_id, rbsa.batch_source_id)'
    'and rsa.salesrep_id between nvl(p_from_salesrep_id, rsa.salesrep_id) and nvl(p_to_salesrep_id, rsa.salesrep_id)'
    Is there any other alternative to replace these two statements by other means.
    Thanks in Advance...

    Dear Friend,
    Please try to replace nvl(p_source_type_id, rbsa.batch_source_id) with decode(p_source_type_id,NULL,rbsa.batch_source_id,p_source_type_id)
    It will speedup your query.
    Regards
    Ahamed Rafeeque Cherkala

  • Firefox Running Slow? Make It Fast

    Firefox Running Slow? Make It Fast

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    Check and tell if its working.
    Might not be related to your problem but some of your Plugins are out-dated:
    * Update All your Firefox Plugins -> [https://www.mozilla.org/en-US/plugincheck/]
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''

  • Query running slow

    Below query is running slow is there any other way to write the query which will enhance the performance.
    select ld.cst_fle_seq,
         tf.date_pro,
         lj.case_num ,
         ca.reference,
         rr.rej_txt
    from
         load_judg lj,
         rej_rea rr ,
         pl_case ca,
         tp_files tf ,
         tp tp
    where rr.rej_code(+) = ld.rej_code
    and ca.case_num (+)=lj.case_num
    and tp.seq =tf.seq
    and lj.cred_code(+) =tp.cst_code
    and tp.format =9
    and valid=''Y''
    and tf.fle_name like ''%F%''
    and lj.rej_code is not null
    and trunc(date_pro)=trunc(sysdate)
    Thanks in advance
    Jha

    Here is the explan plan of the query
    - SELECT STATEMENT Optimizer=CHOOSE (Cost=16 Card=1 Bytes=225)
    -NESTED LOOPS (Cost=16 Card=1 Bytes=225)
    -NESTED LOOPS (OUTER) (Cost=15 Card=1 Bytes=192)
    - HASH JOIN (Cost=14 Card=1 Bytes=147)
    - MERGE JOIN (CARTESIAN) (Cost=9 Card=4 Bytes=432)
    -TABLE ACCESS (FULL) OF LOAD_JUDGMENTS (Cost=1 Card=1 Bytes=69)
    - SORT (JOIN)
    -TABLE ACCESS (FULL) OF TAPE_FILES
    -TABLE ACCESS (FULL) OF TAPES (Cost=4 Card=418 Bytes=16302)
    -TABLE ACCESS (BY ROWID) OF REJECT_REASONS
    -INDEX (UNIQUE SCAN) OF REJ_PK (UNIQUE)
    -TABLE ACCESS (BY ROWID) OF CASES
    -INDEX (UNIQUE SCAN) OF CASE_PK (UNIQUE)
    sorry, as I have checked the tables and its not a cartesian.
    Thanks
    Jha

  • Query is slow in instance1 and fast in instance2 of RAC

    Hi,
    I have a query which runs in 20 minutes in node1 of RAC and the same query run for 10 seconds in node2 of RAC.Node1 is a processing instance which may have more IO but this much elapsed time difference seems to be very odd.Query using same plan in both instances
    Can you please explain me what all possibilities for a query to behave differently in 2 instances of RAC?
    Thanks very much for your help!
    Thanks

    This is definitely wierd! Will it be possible for you to provide the Explain Plan information from both the nodes...hopeful it will help with some pointers/insights.
    Thanks
    Chandra

  • Query running slow when using case inside when

    Hi All,
    I am in the process of creating a query as per the following conditions:
    select count(*) from Alpha A, Beta B
    where
    (case
    when
    A.col1='Pete' and substr(A.col2,1,12)=substr(B.col2,1,12)
    then 1
    else
    -- for all other cases when A.col1 is not equal to 'Pete', substr 1-15 needs to be checked on A and B
    when A.col1 != 'Pete' and substr(A.col2,1,15)=substr(B.col2,1,15)
    then 1
    else 0
    end)=1
    When i run the whole query together, it continues to run forever and i have to eventually kill it. However, when i run the 2 WHEN clauses seperately, it runs within a second and fetches me the correct data. What goes wrong while merging these two inside 2 WHEN clauses that it causes the query to drag?
    Please advise.
    Thanks in advance.

    Not sure,
    Are you saying that you need both the counts seperately? or a combined count?
    how are you joining alpha and beta tables? what is the join condition?
    you need to do something like this,
    SELECT COUNT(CASE WHEN
                        (A.col1 = 'Pete' AND SUBSTR(A.col2,,1,12)=SUBSTR(B.col2,,1,13))
                     OR ( A.col1 != 'Pete' AND SUBSTR(A.col2,,1,15)=SUBSTR(B.col2,,1,15))
                    THEN 1 ELSE 0
                 END)
    FROM alpha A, beta b
    WHERE alpha.join_cloumn= beta.join_columnG.

  • My computer starts to run slow and programs become unresponsive when my iPod is charging/synced

    Why is this so and how can i change it?

    Model Information:
    Serial Number: SMP-bq20z951-3927-e801
    Manufacturer: SMP
    Device name: bq20z951
    Pack Lot Code: 0000
    PCB Lot Code: 0000
    Firmware Version: 002a
    Hardware Revision: 000a
    Cell Revision: 0100
    Charge Information:
    Charge remaining (mAh): 4338
    Fully charged: Yes
    Charging: No
    Full charge capacity (mAh): 4435
    Health Information:
    Cycle count: 84
    Condition: Good
    Battery Installed: Yes
    Amperage (mA): 0
    Voltage (mV): 12440
    System Power Settings:
    AC Power:
    System Sleep Timer (Minutes): 60
    Disk Sleep Timer (Minutes): 10
    Display Sleep Timer (Minutes): 60
    Automatic Restart On Power Loss: No
    Wake On AC Change: No
    Wake On Clamshell Open: Yes
    Wake On LAN: Yes
    Display Sleep Uses Dim: Yes
    GPUSwitch: 2
    Battery Power:
    System Sleep Timer (Minutes): 60
    Disk Sleep Timer (Minutes): 10
    Display Sleep Timer (Minutes): 60
    Wake On AC Change: No
    Wake On Clamshell Open: Yes
    Display Sleep Uses Dim: Yes
    GPUSwitch: 2
    Reduce Brightness: No
    Hardware Configuration:
    UPS Installed: No
    AC Charger Information:
    Connected: Yes
    Charging: No

  • Sql query runs slower from the application

    Hi,
    We are using oracle 9ias on AIX box.The jdk version used: 1.3.1 . From the j2ee application when we perfom a search, the sql query takes for ever to return the results. I know that we are waiting on the database because I can see the query working when I look at TOAD.But if i run the same query on the database server itself, it returns the results in less than a sec. Could you guys throw some light on how we could troubleshoot this problem. Thanks.

    When the results have to travel over the network, it is slow, and when they don't, it is fast.
    That is what you are saying, correct?
    So your approach should be to not bring so much data over the network. Don't select columns you don't need, and don't select rows you don't need.

  • SDO_ANYINTERACT query runs slower with numerous iterations

    hi all,
    I have some PL/SQL code within a loop that take longer and longer to run as it iterates through the loop.
    I have identified the problem function below. It seems that the SDO_ANYINTERACT takes longer and longer to execute the more it is called.
    I have found a bug on metalink 7003151 with indicates a potential memory leak issue. Could this be a cause? I know that this function runs as expected using Oracle Express. The issue is on a development server which has been patched to 10.2.0.4.
    FUNCTION SEARCHFORFEATURE(sTABLE VARCHAR2,gGEOM MDSYS.SDO_GEOMETRY, nSEARCH NUMBER) RETURN VARCHAR2 IS
    TYPE typNIMSREF IS TABLE OF VARCHAR2(10);
    vNIMSREF TYPNIMSREF;
    sSQL VARCHAR2(500);
    BEGIN
         sSQL := 'SELECT NIMSREF FROM ' || sTABLE || ' S WHERE SDO_ANYINTERACT(S.GEOLOC, :gGEOM) = 'TRUE';
         EXECUTE IMMEDIATE sSQL BULK COLLECT INTO vNIMSref USING gGEOM;
         IF vNIMSREF.COUNT = 1 THEN
              RETURN vNIMSREF(1);
         ELSIF vNIMSREF.COUNT > 1 THEN
              RETURN '-1';
         ELSE
              RETURN '-2';
         END IF;
    EXCEPTION -- exception-handling part starts here
         WHEN OTHERS THEN
         dbms_output.put_line(SQLERRM);
         dbms_output.put_line(sSQL);
    END SEARCHFORFEATURE;
    Thanks in advance
    Daniel

    I have run the query in SQLPLUS. As a single call performance is as expected. I ahve included the XPLAN. I have also tried using SDO_RELATE and SDO_INSIDE but it still slows down after a number if interations. I have looked at bug 7003151 but there are not available patches for a window 32bit OS.
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 3399 | 331K| 3 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| WATER_NODES | 3399 | 331K| 3 (0)| 00:00:01 |
    |* 2 | DOMAIN INDEX | WATER_NODES_SDX | | | | |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    2 - access("MDSYS"."SDO_ANYINTERACT"("S"."GEOLOC","MDSYS"."SDO_GEOMETRY"(2003,82086,
    NULL,"SDO_ELEM_INFO_ARRAY"(1,1003,4),"SDO_ORDINATE_ARRAY"(123455.9,123456,123456.1,1234
    56,123456,123456.1)))='TRUE')

Maybe you are looking for

  • How to print a width height report? Urgent!

    I must print some data on pre-printed table. The table is 680w*263h. When I print, I set orientation and size, but the result becomes a 680h*263w report. Below is my code. I'm working on JDK1.4.2-08, is this a JDK bug? please help me, thanks. DocFlav

  • JNI_CreateJavaVM failed with error code -3

    Hi All, I was trying the example from http://java.sun.com/docs/books/tutorial/native1.1/invoking/invo.html but for me it failed.. i m using http://java.sun.com/docs/books/tutorial/native1.1/invoking/example-1dot1/invoke.c i m working on redhat linux

  • Helppppp pleas

    My laptop ideapad lenovo u450p shutdown after windows rady. One time after 5 minutes .and outher time after 1 houser .

  • How to navigate to different page with different user name

    Hi, I have created a DB application.... My application consist of 4 pages....... But if the first user logs into an application means, he needs to see only 3rd page If the second user logs into an application means, he needs to see only 4th page.....

  • Problems with the "Pre-view" button in an OO ALV!

    Hey all, I have a problem with my OO ALV...when I press the "Pre-View" function button from my ALV I get a dump. It says "Fieldsymbol not yet assigned". I check my Fieldcatalog, my out_itab of the ALV....I do not know where is the problem. When I use