Oracle DB 10g - Count records from a subquery is to slow. (after tuning)

Hi everybody:
I have the following problem.
1.- I have a transactional table with 11 millions of records.
2.- The user asked for a few reports, to know some sumarized data for business decisions.
3.- Initialy the query was developed in a development environment, with a subset smaller than the actual data mentioned in label 1.
4.- When the report was delivered to the end user, the report never return data.
5.- at this point, we performed tuning, adding indexes, re-writing the query, using hints, etc. and the following scenario is ocurring:
a) the query without the count, before the tuning was taking about 3 to 5 minutes, and returned aproximatelly 332,000 records-.
b) the numer of records was counted and this query takes aproximatelly 15 to 23 minutes.
c) after the tuning, the raw data, returns in 1 second, we used some b-tree indexes, some FBI (because the report needs to filter by to_char functions).
that time is ok for us, 1 second is a great time in comparison with the 3 to five minutes.
d) the funny thing, is that when we add a simple count(1), count(x) or wathever flavor of count, the count takes about 3 minutes to return, with the 332,00
records. is better than de 15 minutes of course, but we dont need count(1), we need to use group by, order by, etc, and will increase the time of query.
6.- Another thing is happening, if I use count(1) with a transactional table with 600,000 records, without filtering, the count returns in les than 2 seconds. Even if the data is more than the result of my query defined in label 5.c, and that query returns in 1 second.
Please help me with this, I know that maybe is something that i'm not considering on tuning. Or if there is a way to run this count query faster, please let me know.
This is the query:
WITH historial_depurado_v AS (
select serie, identificador,
       cc_form_cc_tifo_tipo_forma
      ,cc_form_serie
      ,cc_form_folio
      ,estatus_nuevo
      ,to_char(fecha,'MM') Mes
      ,to_char(fecha,'YYYY') Anio  -- the table has a FBI for this.
      ,get_recaudacion_x_forma (hifo.CC_FORM_CC_TIFO_TIPO_FORMA
                               ,hifo.CC_FORM_SERIE
                               ,hifo.CC_FORM_FOLIO) Recaudacion  -- function for description.
from  cc_historial_formas hifo
where not exists (select 1
                     from ve_tipos_placas tipl
                    where tipl.cc_tifo_tipo_forma = hifo.cc_form_cc_tifo_tipo_forma)
SELECT serie
  FROM historial_depurado_v hide
WHERE Anio = '2009'  -- using the function based index.
   AND Mes = '01'
   AND Estatus_nuevo = 'UT'
-- returns in 1 second, but if I use count(serie) takes 3 to 5 minutes, and still is not complete, I need to use group by some fields returned by the firs subset.
-- if I count a table with more records, returns in 2 seconds.

alopez wrote:
WHERE Anio = '2009'  -- using the function based index.
AND Mes = '01'
AND Estatus_nuevo = 'UT'
Also, i'm not sure if your internal comment is correct, but if you have a function based index on any of those columns, it will ONLY work when you apply the exact function as defined in the FBI (you aren't using any functions on ANY of your columns).
An example.
create table use_the_fbi
   column1  date
insert into use_the_fbi
select
   trunc(sysdate, 'dd') - level
from dual connect by level <= 10000;
create index use_the_fbi_FBI on use_the_fbi (to_char(column1, 'YYYYMM') );
exec dbms_stats.gather_table_stats( user, 'USE_THE_FBI', cascade=> true, method_opt=> 'for all hidden columns');Let's try without querying in the manner in which we defined the index.
explain plan for
select *
from use_the_fbi
  4  where column1 = '201006';
Explained.
Elapsed: 00:00:00.01
TUBBY_TUBBZ?@xplain
PLAN_TABLE_OUTPUT
Plan hash value: 1722805582
| Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT  |             |   100 |   900 |     7   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| USE_THE_FBI |   100 |   900 |     7   (0)| 00:00:01 |
Query Block Name / Object Alias (identified by operation id):
   1 - SEL$1 / USE_THE_FBI@SEL$1
Predicate Information (identified by operation id):
   1 - filter("COLUMN1"='201006')
Column Projection Information (identified by operation id):
   1 - "COLUMN1"[DATE,7]
23 rows selected.
Elapsed: 00:00:00.02Sad Christmas .. no index love.
Now, query as we defined the index
explain plan for
select *
from use_the_fbi
where to_char(column1, 'YYYYMM') = '201006';
Explained.
Elapsed: 00:00:00.01
TUBBY_TUBBZ?TUBBY_TUBBZ?@xplain
PLAN_TABLE_OUTPUT
Plan hash value: 268331390
| Id  | Operation                   | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |                 |    30 |   450 |     2   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| USE_THE_FBI     |    30 |   450 |     2   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN          | USE_THE_FBI_FBI |    30 |       |     1   (0)| 00:00:01 |
Query Block Name / Object Alias (identified by operation id):
   1 - SEL$1 / USE_THE_FBI@SEL$1
   2 - SEL$1 / USE_THE_FBI@SEL$1
Predicate Information (identified by operation id):
   2 - access(TO_CHAR(INTERNAL_FUNCTION("COLUMN1"),'YYYYMM')='201006')
Column Projection Information (identified by operation id):
   1 - "USE_THE_FBI"."COLUMN1"[DATE,7]
   2 - "USE_THE_FBI".ROWID[ROWID,10], TO_CHAR(INTERNAL_FUNCTION("COLUMN1"),'YYYYMM')[VA
       RCHAR2,6]
27 rows selected.
Elapsed: 00:00:00.03
TUBBY_TUBBZ?Happy times.

Similar Messages

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • Oracle 10g XE migrate from 32bit to 64bit becomes slower

    Oracle 10g XE migrate from 32bit to 64bit becomes slower
    Currently we have a database using Oracle 10g XE R2
    (Oracle Database 10g Express Edition Release 10.2.0.1.0)
    on a linux 32bit server.
    And recently we did migrate it to another 64bit linux server.
    But found after migration is it running slower at 64bit server (~ 25% slower)
    1. We would wonder any tuning is required on 64bit server?
    Besides, as I know Oracle XE only using single core CPU for processing.
    On 32bit linux the CPU is Intel(R) Xeon(R) CPU E31235 @ 3.20GHz
    On 64bit linux the CPU is Intel(R) Xeon(R) CPU E5-2470 v2 @ 2.40GHz
    2. Would the CPU clock speed on a single core also made the 64bit Oracle slower?
    Thanks a lot.

    32 or 64 bit normally won't cause much performance difference as long as you can't use > 4GB RAM
    Please note that XE can use only 1 core and 1GB memory.
    According to benchmarks, Single Thread Rating of the 2 CPU really differ by around 25%. Quite consistent with your observation.
    Of course, IO (i.e., disk) speed is also an important factor.
    https://www.cpubenchmark.net/cpu.php?id=2003
    https://www.cpubenchmark.net/cpu.php?id=1200

  • Count Records from JDBC Sender

    Hi Experts,
    I have a requirement to process 80,000 records once a month from MS SQL Server to BW.
    After tuning of server and assigning the XBTM queue for the scenario didnt help much and brings down the J2EE engine everytime.
    Now i am thinking of processing 5000 records at a time in a BPM (in a while loop). But i somehow need to trap the overall number of records which is not always 80k.
    set rowcount 5000 SELECT * table_name where XIProcessed is NULL (SELECT COUNT(*) from table_name) 
    and then sending an UPDATE of XIProcessed flag to get the next 5000 rows in the JDBC sender.
    I somehow need to get the total number of records and the COUNT function will not help as i am getting 5000 rows at a time and not all.
    Thanks

    Hi Siva,
    why do you attempt counting in the BPM and adding all this overhead? Can't you just do that on the Database directly? In Oracle this is fairly easy as you can use the pseudo column rownum to limit your results. A search for rownum and SQL Server shows, that it is not as easy on SQL Server but there are still fairly simple ways to do this.
    Some sources:
    http://blogs.x2line.com/al/articles/173.aspx
    http://www.databasejournal.com/features/mssql/article.php/10894_2244821_2
    http://www.mcse.ms/archive94-2005-3-1502710.html
    From a performance standpoint i'm sure, it will work a lot better than any BPM into which you put 80000 records.
    Regards
    Christine

  • Counting Record from OPEN FOR statement

    Hi,
    Is there a way to count the number of record produce by OPEN ... FOR statement...?
    I tried using %ROWCOUNT. It doesn't seems to be working. It returned me 0 though when i printed the cursor, i had 7 records.
    OPEN p_cursor FOR sqlstatement;
    pnum_record := p_cursor%ROWCOUNT;Thank you everyone!

    Dave,
    My procedure is supposed to return back the records to the caller (application)
    Below is the spec
    PROCEDURE query_licensetype (
          p_cursor     IN OUT   cursortype,
          p_num_page   IN OUT   PLS_INTEGER,
          p_string              VARCHAR2 DEFAULT NULL,
          p_pageno              PLS_INTEGER DEFAULT 1,
          p_pagerow             PLS_INTEGER DEFAULT 20,
          p_asc                 PLS_INTEGER DEFAULT 1
       )And a piece of the code that open it
    OPEN p_cursor FOR vsql USING p_string, p_string, vstart_rec, vend_rec;I am not sure how to do what you have suggested.
    Can you show me how to FETCH all the record from p_cursor and still returning back the record to the caller?
    Thanks Dave!

  • Oracle forms 10g Parameter passing from forms to reports

    Hello Room,
    Please let me know what is wrong with this code. It is not passing parameter at all to the reports 10g parameter form from forms 10g, no matter what. I tried to delete the parameter from reports parameter form, I also tried to enable/disable restricted values from reports, I tried to hide the parameter from reports, but it is just not doing it.
    DECLARE
    pl_id PARAMLIST;
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status varchar2(20);
    report_job_id VARCHAR2(100);
    fill varchar2(100);
    reportname varchar2(200);
    ab varchar2(200);
    cursor c200 is select CONAME,LOCATIONMASTER.LOCNAME FROM USERCODETL,MULCOMP,LOCATIONMASTER
    WHERE MULCOMP.CO=USERCODETL.CO
    AND USERCODETL.USERID = SUBSTR(AB,1,50) AND USERCODETL.LOCCD = LOCATIONMASTER.LOCCD;
    begin
         AB := GET_APPLICATION_PROPERTY(USERNAME);
    OPEN C200;
    FETCH C200 INTO :block4.coname,:block4.locname;
    CLOSE C200;
    synchronize;
    pl_id:=GET_PARAMETER_LIST('paramlist');
    IF NOT ID_NULL(pl_id) THEN
    DESTROY_PARAMETER_LIST(pl_id);
    END IF;
    pl_id:=CREATE_PARAMETER_LIST('paramlist');
    Add_Parameter(pl_id, 'vcompany', TEXT_PARAMETER, :block4.coname);
         Add_Parameter(pl_id, 'vlocname', TEXT_PARAMETER, :block4.locname);
    repid := find_report_object('testreport');
    fill := GET_REPORT_OBJECT_PROPERTY(repid, report_server);
    reportname := GET_REPORT_OBJECT_PROPERTY(repid, report_filename);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repsrv');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no'||'vcompany='||:block4.coname||'vlocname='||:block4.locname);
    v_rep := RUN_REPORT_OBJECT(repid,pl_id);
    WEB.SHOW_DOCUMENT('/reports/rwservlet?report='||reportname||'&desformat=pdf&destype=cache&userid=scott/tiger@servernew&paramform=yes');
    END;
    Please help. Thank you in advance.

    Hello Inol,
    Greetings !
    There seems to be a syntax error when I run your code:-
    REP-52251: Cannot get output of job ID 272 you requested on Fri Apr 08 02:37:25 GMT 2011.<P>REP-51026: No output for job 272
    when I run then command:-
    http://local-pc:8889/reports/rwservlet/showjobs
    Terminated with error: <br>REP-159: Syntax error on command line.
    Is there a error on your statement ?
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1) ||'?server=repsrv );
    it should be
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1) ||'?server=repsrv ' );
    then only it is getting compiled properly. A single quote in the end !
    And finally I changed this line
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_1='||:SP_USERCODE 'p_my_second_parameter='||:block.my_second_parameter);
    to this line
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_1='||:SP_USERCODE|| *'p*mysecond_parameter='||:block.my_second_parameter);
    as it is giving error where highlighted in bold Is it necessary to change and add a concatenation there ?_
    But... But... even though I compile it properly the code is getting executed and it is giving the above error. Please note the same.
    Also please tell me what should be the status of the following things in report builder 10g.
    1. Shall I remove the parameters vcompany and vlocname from the parameter form and keep it just in parameters of report , There is a third parameter which I want the user to input while running the report other than these 2 parameters ?
    2. Shall I restrict the parameter to predetermined values ?
    3. Shall I hide the first column of the parameter in report builder.
    I have also tried to simulate the execution parameters from batch to runtime and comm mode to synchronous and asynchronous and vice versa. I have also given command rwserver server = repsrv on my pc and also server pc. please let me know about this also whether I need to give this command every time ? I mean for every booting ?
    As this problem is faced by many people. I think it should work across the fly as given by you or rather corrected by you. I would also like to know is there any patch available for the same released by oracle, as I have read somewhere in the forum here which I cannot locate the thread now. I do not mind paying for support if I find the need ?
    Please help me further. Thank you.

  • Q: How to access Oracle DB 10g XE Linux from "OpenSuse11" desktop

    Hello all
    I am just throwing this question out there as I have not yet done my homework on this topic. I know Oracle has a client application that one can install on Windows XP and access the DB on a Windows server e.g. 2003.
    Q1 Is there a client application that one can install on an "OpenSuse 11" desktop to access the DB?
    Q2 Would one need such an application to access the DB? Eventhough one can access the DB via Firefox?
    Q3 Has anyone gone down this path and what issues if any I should be concern with?
    Thank you in advance
    Regards,
    Luis

    Hi luis, you have to install oracle Client for Linux x86/x86_64 for accessing to the database. it's not neccesary install the client for an application, for example if you use jdbc in java application, you put all parameters(protocol, ip, service name, etc) to configure it.
    TOM

  • How to enable tracing in Oracle Forms 10g

    Hi Friends,
    I am interested to trace my running oracle forms application. When I googled it, I got below useful information. But theory and practical has mismatch somewhere, I am not able to create the trace file(s).
    **************************** Some Notes ****************************************************
    How to Enable Tracing in Oracle Forms 10g
    Enable Tracing from the url by adding the following to your forms url:
    &record=forms&tracegroup=0-98,100-199 (note: item 99 causes some issues, so we are skipping it here. See the Oracle documenation for a description of what is being traced for each item.)
    for example
    [http://machine:port/forms/frmservlet?config=myConfig&record=forms&tracegroup=0-98,100-199]
    You will get a trace file in the following location:
    %ORACLE_HOME%\forms\trace\forms_xxx.trc where xxx is the forms session ID.
    Open dos window and do the following:
    set ORACLE_HOME=
    set PATH=%ORACLE_HOME%\jdk\bin;%PATH%
    set CLASSPATH=%ORACLE_HOME%\jdbc\lib\classes12.zip;%ORACLE_HOME%\forms\java\frmxlate.jar
    java oracle.forms.diagnostics.Xlate datafile=%ORACLE_HOME%\forms\trace\forms_xxx.trc outputfile=%ORACLE_HOME%\forms\trace\html_xxx.html outputclass=WriteOutHTML
    you will get a file html_xxx.html in your %ORACLE_HOME%\forms\trace directory.
    I need information beyond this to make this practically successful.
    Thanks in advance,
    Amol Naik

    Hello,
    <p>Did you read this paper ?</p>
    Francois

  • Creating a new database in Oracle Database 10g...

    I have downloaded a copy of Oracle Database 10g Express Edition from Oracle's website. I am using Windows XP. I am trying to create an Oracle database that I can connect to from Access 2003 via ODBC.
    1. How do I create a new database? I can see options to create tables, views, etc. but not a database.
    2. I have created a System DSN connection in the ODBC Data Source Administrator for the Oracle ODBC driver. Once I create a database in Oracle, how do I actually establish a connection to it from Access? The ODBC code to connect is there, but when I run it, I get an error.
    Any help would be appreciated. Thanks.

    1. How do I create a new database? I can see options to create tables, views, etc. but not a database.If you can see those options then you are already connected to the database. You probably want to create a user, not a database (are you by chance coming from SQL Server?)
    driver={OracleDriver};Dbq=TESTDBQ;Uid=Administrator;Pwd=;You would replace "Administrator" with the name of the user you created in the database.

  • SQL slow after upgrading to Oracle Database 10g Enterprise Edition Release

    Hi all:
    We have recently upgraded our database from Oracle9i Enterprise Edition Release 9.2.0.6.0 to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    After that we found that our some sql getting very slow
    for example query with 9i showing result in 4 seconds while in 10g showing result in 28 seconds.
    Following is the execution plan of my query in Oracle9i
    Operation     Object     PARTITION_START     PARTITION_STOP     COST
    SELECT STATEMENT ()                    9458
    NESTED LOOPS ()                    9458
      SORT (UNIQUE)                    
       INDEX (RANGE SCAN)     BL_EQ_PK_N               2
      VIEW ()     CONTAINER_INFO               2
       UNION-ALL (PARTITION)                    
        TABLE ACCESS (BY INDEX ROW     SERVICE_EVENTS               1
         NESTED LOOPS ()                    11
          NESTED LOOPS ()                    10
           NESTED LOOPS (OUTER)                    9
            NESTED LOOPS ()                    8
             NESTED LOOPS ()                    7
              NESTED LOOPS ()                    6
               NESTED LOOPS ()                    5
                NESTED LOOPS ()                    4
                 NESTED LOOPS (OUT                    3
                  TABLE ACCESS (BY     EQUIPMENT_USES               2
                   INDEX (UNIQUE S     EQUSE_PK               1
                  TABLE ACCESS (BY     SHIPPING_LINES               1
                   INDEX (UNIQUE S     LINE_PK               
                 INDEX (UNIQUE SCA     EQHT_PK               
                TABLE ACCESS (BY I     EQUIPMENT_TYPES               1
                 INDEX (UNIQUE SCA     EQTP_PK               
               TABLE ACCESS (BY IN     EQUIPMENT_SIZES               1
                INDEX (UNIQUE SCAN     EQSZ_PK               
              TABLE ACCESS (BY IND     SHIP_VISITS               2
               INDEX (RANGE SCAN)     SVISIT_UK               1
             TABLE ACCESS (BY INDE     SHIPS               1
              INDEX (UNIQUE SCAN)     SHIP_PK               
            TABLE ACCESS (BY INDEX     CARE_VIR_MAP               1
             INDEX (UNIQUE SCAN)     VIR_VESVOY               
           TABLE ACCESS (BY INDEX      EQUIPMENT               1
            INDEX (RANGE SCAN)     EQ_EQUSE_FK               
          INDEX (RANGE SCAN)     SEVENTS_EQUSE_FK_N               
        NESTED LOOPS ()                    7
         NESTED LOOPS ()                    6
          NESTED LOOPS ()                    5
           NESTED LOOPS ()                    4
            NESTED LOOPS (OUTER)                    3
             TABLE ACCESS (BY INDE     EQUIPMENT_USES               2
              INDEX (UNIQUE SCAN)     EQUSE_PK               1
             TABLE ACCESS (BY INDE     SHIPPING_LINES               1
              INDEX (UNIQUE SCAN)     LINE_PK               
            INDEX (UNIQUE SCAN)     EQHT_PK               
           TABLE ACCESS (BY INDEX      EQUIPMENT_TYPES               1
            INDEX (UNIQUE SCAN)     EQTP_PK               
          TABLE ACCESS (BY INDEX R     EQUIPMENT_SIZES               1
           INDEX (UNIQUE SCAN)     EQSZ_PK               
         TABLE ACCESS (BY INDEX RO     EQUIPMENT               1
          INDEX (RANGE SCAN)     EQ_EQUSE_FK               and following is my query plan in Oracle 10g
    Operation     Object     PARTITION_START     PARTITION_STOP     COST
    SELECT STATEMENT ()                    2881202
    NESTED LOOPS ()                    2881202
      SORT (UNIQUE)                    2
       INDEX (RANGE SCAN)     BL_EQ_PK_N               2
      VIEW ()     CONTAINER_INFO               2881199
       UNION-ALL ()                    
        NESTED LOOPS (OUTER)                    2763680
         NESTED LOOPS ()                    2718271
          NESTED LOOPS ()                    2694552
           NESTED LOOPS ()                    2623398
            NESTED LOOPS (OUTER)                    2623380
             NESTED LOOPS ()                    2393965
              NESTED LOOPS ()                    2393949
               NESTED LOOPS ()                    2164536
                NESTED LOOPS ()                    1706647
                 NESTED LOOPS ()                    854120
                  TABLE ACCESS (FU     BL_EQUIPMENT               1515
                  TABLE ACCESS (BY     EQUIPMENT_USES               1
                   INDEX (UNIQUE S     EQUSE_PK               1
                 TABLE ACCESS (BY      EQUIPMENT               1
                  INDEX (RANGE SCA     EQ_EQUSE_FK               1
                TABLE ACCESS (BY I     EQUIPMENT_TYPES               1
                 INDEX (UNIQUE SCA     EQTP_PK               1
               TABLE ACCESS (BY IN     EQUIPMENT_SIZES               1
                INDEX (UNIQUE SCAN     EQSZ_PK               1
              INDEX (UNIQUE SCAN)     EQHT_PK               1
             TABLE ACCESS (BY INDE     SHIPPING_LINES               1
              INDEX (UNIQUE SCAN)     LINE_PK               1
            INDEX (RANGE SCAN)     SEVENTS_TSERV_FK_N               1
           TABLE ACCESS (BY INDEX      SHIP_VISITS               2
            INDEX (RANGE SCAN)     SVISIT_UK               2
          TABLE ACCESS (BY INDEX R     SHIPS               1
           INDEX (UNIQUE SCAN)     SHIP_PK               1
         TABLE ACCESS (BY INDEX RO     CARE_VIR_MAP               2
          INDEX (UNIQUE SCAN)     VIR_VESVOY               1
        NESTED LOOPS (OUTER)                    117519
         NESTED LOOPS ()                    98158
          NESTED LOOPS ()                    78798
           NESTED LOOPS ()                    78795
            NESTED LOOPS ()                    59432
             TABLE ACCESS (FULL)     EQUIPMENT_USES               20788
             TABLE ACCESS (BY INDE     EQUIPMENT_TYPES               1
              INDEX (UNIQUE SCAN)     EQTP_PK               1
            TABLE ACCESS (BY INDEX     EQUIPMENT               1
             INDEX (RANGE SCAN)     EQ_EQUSE_FK               1
           INDEX (UNIQUE SCAN)     EQHT_PK               1
          TABLE ACCESS (BY INDEX R     EQUIPMENT_SIZES               1
           INDEX (UNIQUE SCAN)     EQSZ_PK               1
         TABLE ACCESS (BY INDEX RO     SHIPPING_LINES               1
          INDEX (UNIQUE SCAN)     LINE_PK               1can somebody help me regarding this?
    Thanks
    Hassan

    I would say ..gather stats on 9i/10gfor the required table and indexes , then post the expalin plan.
    --Girish                                                                                                                                                                                                                               

  • Urgent : i am not able to coonect the report through oracle forms  10g

    i created a report "test1" through oracle report 10g and calling from oracle forms 10g
    i tried to run the report from forms builder but i am getting the following error
    "server can not connect 41213 error"
    from run mode i already given the following command for running the report server
    rwserver server=rep_fsprod
    The help is saying like that
    cause:  There is a problem connecting to the specified Report server. Action:  Check the Report server and make sure it is up and running. Level:  20
    Any pleae provide me the necessor setting for this issue and give me some good reselution
    But i am not sure where is the problem
    If anybody thats will be helpfull for me. please provide the step that i need to take
    the following are the code
    ------------------------------------------------------------>
    Declare
         PL_Id     ParamList;
    v_Report VarChar2(30) := 'TEST1';
    v_Rep_Id Report_Object;
    v_Rep_Job_Id VarChar2(100);
    v_Job_Id VarChar2(100);
    v_Rep_Status VarChar2(100);
    v_Rep_URL VarChar2(1000);
    v_Host_Name VarChar2(100) := 'localhost';
    v_Port     VarChar2(100) := '8889';
    v_Rep_Server VarChar2(100) := 'abc';
    Begin
    PL_Id := Get_Parameter_List(v_Report);
    If Not Id_Null(Pl_Id) Then
    Destroy_Parameter_List(Pl_Id);
    End If;
    Pl_Id:=Create_Parameter_List(v_Report);
    Add_Parameter(PL_Id, 'Usr_Id', Text_Parameter, 'cms');
    Add_Parameter(Pl_Id, 'ParamForm', Text_Parameter, 'NO');
    --Find Report Object
    v_Rep_Id := Find_Report_Object('TEST1');
    --Communication Mode
    Set_Report_Object_Property(v_Rep_Id, Report_Comm_Mode, Synchronous);
    Set_Report_Object_Property(v_Rep_Id, Report_Desformat, 'HTML');
    --Handled Destination Type and Name
         Set_Report_Object_Property(v_Rep_Id, Report_DesType, CACHE);
    --Specify Report Server and Report File Name
    Set_Report_Object_Property(v_Rep_Id, Report_Server, v_Rep_Server);
    Set_Report_Object_Property(v_Rep_Id, Report_FileName, v_Report);
    --Run Report
    v_Rep_Job_Id := Run_Report_Object(v_Rep_Id, PL_Id);
    v_Rep_Status := Report_Object_Status(v_Rep_Job_Id);
    If v_Rep_Status = 'FINISHED' Then
              v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2);
              v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server;
    Message(v_Rep_URL);
                   Web.Show_Document(v_Rep_URL, '_blank');
    Else
         Message('Error Running Report');
    End If;
    End;
    ------------------------------------------------------------>

    i am facing same please do some favour me for this report issue

  • Installation error - Oracle Database 10g Express Edition

    Hi - I've just tried to install Oracle Database 10g Express Edition from the Oracle website and I'm getting this error.
    Error 1327 Invalid Drive: I:\ . I've googled the error but can't find much. It seems that the path is hardcoded into the msi installation package.
    Anyone else seen this issue before as I'm at a loss at what to do ?
    I'm wondering do I have to create an I:\ drive on my machine but that seems a little unusual
    Hope someone can help
    Cheers.

    This problem may occur if you have used the Disk Administrator utility included in Microsoft Windows to change the drive letter of the hard disk that the operating system is installed on, for example, the C drive.
    The problem occurs because the Oracle Universal Installer uses registry keys to determine the locations of certain folders that are required to install Oracle. If the drive letter of the hard disk that contains the operating system has been changed, the registry keys refer to nonexistent folders and Setup fails.
    To correct this problem, use the Windows Disk Administrator program to restore the drive letter of the hard disk to its original value:
    1. Click Start, point to Programs, point to Administrative Tools, and click Disk Administrator.
    2. Right-click the drive whose letter you want to change. On the shortcut menu, click Assign Drive Letter.
    3. Select the correct drive letter from the list and click OK.
    If you are prompted to quit the Disk Administrator or to restart your computer, do so. Once the computer has restarted, attempt to install again.

  • Count new records from Oracle function.

    Is it possible to count all the new records inserted? I have a script with a couple of insert statements, before I do commit all the actions done in the script I like to read the numbers of new records. I do not have a key that I can use to select those records so I have to make use of a possible Oracle internal option to find out which records are inserted in a certain table after the last commit. Is there such a option?
    With kind regards,
    Johan Louwers.

    David is close, but sql%ROWCOUNT does not work at the sql prompt, not even for INSERT/SELECT.
    SQL> INSERT INTO t VALUES (2, 'TWO');
    1 row created.
    SQL> exec DBMS_OUTPUT.Put_Line('The count is: '||sql%rowcount);
    The count is:
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> CREATE TABLE t1 as SELECT * FROM t WHERE 1=2;
    Table created.
    SQL> INSERT INTO t1
      2  SELECT * FROM t;
    1 row created.
    SQL> exec DBMS_OUTPUT.Put_Line('The count is: '||sql%rowcount);
    The count is:
    PL/SQL procedure successfully completed.
    SQL> rollback;
    Rollback complete.However, if you wrap the thing in a BEGIN/END block, then it works:
    SQL> BEGIN
      2  INSERT INTO t1
      3  SELECT * FROM t;
      4  DBMS_OUTPUT.Put_Line('The count is: '||sql%rowcount);
      5  END;
      6  /
    The count is: 1
    PL/SQL procedure successfully completed.Note that sql%rowcount is not cumulative, it gets reset for every DML operation, so if you have more than one INSERT, and you want to know how many rows were inserted in total, you will need to put the rowcount into a variable and add it up yourself.
    HTH
    John

  • Export tables and records from oracle 8i to oracle 10g

    hi,
    i had installed oracle 10g, but i want to export my tables and record from oracle 8i to oracle 10g.
    can you tell me

    Please have a look to Using Different Releases and Versions of Export in Utilities document.

  • Running an exe from within Oracle WebLogic 10g R3 does not find dll

    Hi,
    I am facing a strange issue with Oracle WebLogic 10g R3.
    I use the code as shown in Listing 1 below to run a windows based application exe (batch job) from within my web application hosted on Oracle WebLogic 10g Release 3.
    Note that this code woks fine on Tomcat 6.x and OC4J (JDeveloper TP4).
    The exec gets executed but the log of the exe program shows it could not load certain DLLs.
    Note that these DLLs are in the same directoy as the Batch program and this directory is in the PATH.
    Running through simple Java Program Successful*
    When I run the same program from a java program it runs successfully. So this means some WebLogic environment does not get set properly.
    Running directly BatchProg.exe rather than cmd.exe fails*
    Also note that when I run the exe directly e.g. BatchProg.exe rather than through cmd.exe it gives me a error the system did not find the file specified.
    CreateProcess error=2, The system cannot find the file specified with cause java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    Listing 1:*
    String[] commandArgs = new String[|http://forums.oracle.com/forums/] { "cmd.exe", "/C", "BatchProg.exe \"param1\" \"param2\" " },null , l_workingDir)
    Runtime rt = Runtime.getRuntime();
    Process proc;
    proc = rt.exec( commandArgs, envParams, workingDir );
    ProcessIO errStream = new ProcessIO( proc.getErrorStream(), "ERROR");
    ProcessIO outStream = new ProcessIO( proc.getInputStream(), "OUTPUT");
    errStream.start(); // process any errors from the command
    outStream.start(); // process any output from the command
    System.out.println("Error=" +errStream);
    System.out.println("Out" + outStream);
    return (p_waitToFinish ? proc.waitFor() : this.SUCCESS);

    OK.
    I have posted this on the WebLogic Forum.
    Thanx.

Maybe you are looking for

  • Generate to File not working

    Hai, we are calling the report using the command line method not run_product.for these reports 'Generate to File' menu is not working.It shows an error like Umimplemented Error (rep-0999).There is one default printer attached to m/c. and the operatio

  • My volume buttons won't work on my iPod touch 4th gen.

    Whenever i try to turn it up, it won't work. So i go to the music and turn it up that way, but it slides down and is silent. it will stay for a couple seconds but not for a long time. everything else works, even though the volume pop up that comes on

  • SD Document flow with Leading zeros

    Hi All, We have issue with docuemnt flow, when we click document flow sales order or delivery or billing its showing leading zeros, My client  don't want any leading zeros in docuemnt flow. For example - if i click on document flow its showing - 0050

  • Export to Excel option missing

    Post Author: jeffnc CA Forum: Exporting We distribute Crystal Reports 8.5 dlls with our product.  When a report is displayed (Print Preview), and the export icon is clicked, we get a drop down menu with export options.  Sometimes Excel is an availabl

  • Which is the most recent MacBook Pro with a hard disk?

    I am looking to upgrade from my present MacBook Pro (early 2011). However, I found out that all new MacBook Pro's come with solid state memory instead of hard disks (which would be nice if it werent for the exorbitant price tag to get anywhere close