Time Taking while firing a select Query

i am unable to access the table "X" in ABC schema
its taking toooooooooo much time while firing just a select query
how to resolve it
"SELECT digital_signing_cert
FROM X"

could be due to huge table size,crosscheck this from user_segments view.
select bytes/1024/1024 "MB" from user_segments where segment_name='X';
also check database alert log for any error.

Similar Messages

  • TIME-OUT error in BSAK select query(Progress Indicator is also used)

    Hi,
        In my report program one select query is there on BSAK table, which is as follows --
           SELECT BUKRS                                                     
                         BELNR
                        GJAHR
                        SHKZG
                        BSCHL
                        UMSKZ
                        LIFNR
                        EBELN
                        EBELP
                        WRBTR
                        DMBTR
                        XZAHL
                        REBZG
                       AUGBL
                       BLART
                       AUFNR
                       AUGDT
                       BUZEI FROM BSAK
                                  INTO TABLE IT_BSAK
                                  FOR ALL ENTRIES IN IT_BKPF1
                                   WHERE BUKRS = IT_BKPF1-BUKRS
                                                AND AUGDT = IT_BKPF1-BUDAT
                                                AND AUGBL = IT_BKPF1-BELNR
                                                AND BSCHL IN ('31' , '29', '26', '39', '25').
    I used Progress Indicator befor running this query and after this query also. But still It's giving me TIME-OUT error in this select query only.
      I run the same query for 10 records in IT_BKPF1 table, it runs perfectly. But when I run it for 1000 records it giving dump.
    And in actual bussiness my records are always more than 100 only.
    I also check the indexing. It having secondary indexing on this BUKRS, AUGDT, AUGBL fields. Then also it's giving error.
    so, How can I solve this dump..?? What could be the reason..??
    Thanks in advance...!!
    Regards,
    Poonam.

    Hi Poonam Patil,
    Try to provide BELNR and GJAHR in where condition...
    BKPF-DBBLG ==> BSAK-BELNR
    Also check
    BKPF-BLDAT ==> BSAK-AUGDT
    Check out above relation...
    If data is there in these fields of the table and both are matching then you can pass it and as they are in primary key of BSAK it will improve the performance...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Runtime error(Time limit exceeds)after executing select query

    Dear experts, whenever i executing the select query in this zprogram i am getting runtime error that time limit exceeds.i am using inner join and into table.after that also i am geetting error. how can i resolve it??
    SELECT LIKP~VBELN LIKP~WADAT_IST LIKP~VEHICLE_NO LIKP~TRNAME
              LIKP~VEHI_TYPE LIKP~LR_NO LIKP~ANZPK LIKP~W_BILL_NO
              LIKP~SEALNO1                                       " Seal NO1
              LIKP~SEALNO2                                       " Seal NO2
              LIPS~LFIMG
              VBRP~VBELN VBRP~VGBEL VBRP~MATNR VBRP~AUBEL VBRP~FKIMG
              VBAK~AUART
              VBRK~FKART VBRK~KNUMV VBRK~FKSTO
              FROM LIKP INNER JOIN LIPS ON LIKP~VBELN EQ LIPS~VBELN
                        INNER JOIN VBRP ON LIKP~VBELN EQ VBRP~VGBEL
                        INNER JOIN VBAK ON VBRP~AUBEL EQ VBAK~VBELN
                        INNER JOIN VBRK ON VBRP~VBELN EQ VBRK~VBELN
              INTO TABLE  I_FINAL_TEMP
              WHERE LIKP~VSTEL = '5100' AND
                 LIKP~WADAT_IST IN S_WADAT  AND
                    VBRP~AUBEL IN S_AUBEL AND
                    VBAK~AUART IN ('ZJOB','ZOR') AND
                    VBRK~FKART IN S_FKART AND
    *               VBRK~FKART IN ('ZF8','ZF2','ZS1') AND
                    VBRK~FKSTO NE 'X'.
    When I am debugging the select query.the cursor will not go to next step.after 15-20 minutes i am getting runtime error(time limit exceeds).
    how can i resolve it for that scenario??

    Looks like whole SD flow you trying to fetch in single query
    First you check the database statistic of these table are upto date in system ( Check with basis team )
    if this query was working fine earlier.
    Most of table involved are huge volume tables which queried with any primary key
    Any secondary index on created for LIKP on VSTEL WADET ?
    My suggestion would be split the selection queries and make use of primary or existing secondary index to fetch the desired result if possible. For testing purpose split the queries and find which is taking more time and which needs index by taking squel trace in ST05.
    Also take ST05 trace of this query in debugger ( New debugger -> special tool -> trace > ST05/SE30)

  • Find Time, when I give a SELECT query in oracle  ... ...

    Dear Friends ,
    Using the below query we got the username , sid with the CURRENT_SQL information .
    SELECT s.sid sid, s.serial# serial_id, s.status session_status, s.username oracle_username, s.osuser os_username, p.spid os_pid, s.machine session_machine, s.program session_program
    , s.client_info , SUBSTR(sa.sql_text, 1, 1024) current_sql FROM v$process p , v$session s , v$sqlarea sa WHERE p.addr = s.paddr AND s.sql_address = sa.address(+)
    AND s.sql_hash_value = sa.hash_value(+) AND s.audsid <> userenv('SESSIONID') AND s.username IS NOT NULL AND s.status = 'ACTIVE' AND s.username not in ('SYS','SYSTEM','DBSNMP','SYSMAN') ORDER BY sid;
    But I need to know in which time with date ,  I execute this SELECT query .
    Here I explain my problem and that is , In my centralized database , we have a lot of clients . so If any client gives a command to show a report , I need to find out in which time he/she executes the report ?
    Waiting for kind reply ... ...

    The issue as you have described just does not make sense unless the recorders ae not ordered by the test number.
    Does the number of records returned match the number in the DB?
    Ben
    PS: No Mike, you are still the DB guy. Relax. 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Syntax error while writing a select query.

    Hi all,
    I have a requirement where I have to pick a value if the text for that value is
    MYCARu2019S Lovliest Car.
    And so I wrote a query that
    SELECT     RUECK INTO XRUECK FROM AFVC WHERE ltxa1 = ' MYCARu2019S Lovliest Car'.
                    ENDSELECT.
    But it gives me a syntax error saying     
    u201CLiterals taking up more than one line not permittedu201D.
    Can some one tell me what is wrong. I need to select RUECK value from AFVC  table if
    ltxa1 value is ' MYCARu2019S Lovliest Car'.
    Kindly help what is going wrong...
    Regards,
    Jessica Sam

    Hi,
    Narendran is right use two single quotes.
    also careful wile comparing string. i think as you write ltxa1 value is ' MYCARu2019S Lovliest Car'.
    so while comparing you must not use space just before staring use the following
    SELECT  rueck INTO xrueck FROM afvc WHERE ltxa1 = 'MYCAR''S Lovliest Car'. " Not use Space before M
    ENDSELECT.
    Hope will help you.
    Kind Regards,
    Faisal

  • ORA-01653 error while executing a select query over DBLINK

    Hi,
    We have a query that is running to extract some data from a remote DB over DBLINK.
    The query is failing by throwing the error "ORA-01653 -- Unable to extend.........".
    Is this a problem with the "temp" tablespace of local database or is this with the "temp" tablespace of remote DB.
    As far as my knowledge goes, I guess any statement , selecting data over dblink where the query is being fired actually in remote db over dblink uses the temp tablespace of that DB only and hence the problem should be with the temp tablespace of remote db only but I am not very sure about this.
    Is there any chance that it can be problem with "temp" tablespace of local DB from where the query is being fired over dblink.
    It would be really helpful if anyone can throw some light on this.
    Thanks

    The error stack will normally tell you if the exception is raised in the remote database.
    You might try using the driving_site hint (see performance guide) to push work to the remote site or pull it local. It all depends on your particular query and explain plan.
    Remember to use { code } (without the embedded spaces) tags to frame your code and explain plan so it remains formatted, if you post it here.

  • OpenSQLException while executing a select query

    Hi,
    I am attempting to code an SQL query in a servlet  and get the following exception:
    com.sap.sql.log.OpenSQLException:
    Below is the code snippet I am using:
    String weekStart = request.getParameter("weekStart");
    String weekEnd = request.getParameter("weekEnd");
    final Connection con = ConnectionManager.getConnection();
    Statement stmt = con.createStatement();
    String query = "select * from SCHEDULES where BUS_PARTNER_ID = '" + empID + "' and SCHED_DATE  >= '" + Date.valueOf(weekStart) + "' AND  SCHED_DATE  <= '" + Date.valueOf(weekStart) + "';";
    final ResultSet rs = stmt.executeQuery(query);
    The fromDate and toDate parameters are of type string and have format yyyy-mm-dd which is getting passed to the servlet .Values are like 2010-07-13 etc.Issue seems to be with the date beacuse query is working fine without date parameters.
    Can someone please tell me what I am doing wrong and how to fix it?
    thanks
    Reena

    Yes. I understand. Seems as if that's one of the reasons for the error. However, Note:401436.1 speaks on Bug fixes by problem type and listed IOT related bugs.

  • ORA-00600 errror while executing a select query.....!!!!

    Hi experts,
    Need ur kind help and suggestions....
    My DB is on 10.2.0.1.0.
    When I run the following query I am getting ORA-00600: internal error code, arguments: [qkagby.noexec], [], [], [], [], [], [], [] error.
    The table CUSTOMER_HISTORY is an Index Organized table.
    SELECT (CASE WHEN townname IS NULL THEN 'TOTAL' ELSE district END) DISTRCT ,
    TOWNNAME,(CASE WHEN WWWREVENUE<>'0' THEN NOSUBS ELSE 0 END ) "NO OF SUBS",WWWREVENUE FROM (SELECT district,TOWNNAME, COUNT(DISTINCT b.msisdn ) NOSUBS,NVL(SUM(REV),'0')
    WWWREVENUE FROM CUSTOMER_HISTORY a,(SELECT msisdn,SUM(USAGE)/100 REV FROM SERVICE_USAGE
    WHERE SERVICE='WWWUSAGE' GROUP BY msisdn) b
    WHERE a.msisdn=b.msisdn(+)
    GROUP BY CUBE(district,TOWNNAME)
    ORDER BY district)
    WHERE district IS NOT NULL
    ORDER BY townname;
    When I try running explain plan I am getting the same ORA-600 error..
    Please advice..
    Thanks in advance...
    Chotu.

    Yes. I understand. Seems as if that's one of the reasons for the error. However, Note:401436.1 speaks on Bug fixes by problem type and listed IOT related bugs.

  • In  RSA1 transaction, I written SELECT QUERY while compile It shows error

    Hi All,
                   While compile my SELECT query in RSA1 trans, ENDROUTINE, It show error...
                Select single MAX( date )
                         from dbtable
                         into W_DATE
                        where DOC_NUMBER = w_itab-DOC_NUMBER
                          and S_ORD_ITEM = w_itab-S_ORD_ITEM
                          and Plant     = 'number'.
    ERROR
    E:Unknown column name " date ". not determined until runtime, you
    cannot specify a field list.
    help me please
    reward

    Hi,
    make sure the column 'date' exists in your dbtable. If that is the case, you may be need to take out the spaces in ( date ).
    regards
    Siggi

  • (view hint or Query  writing method) using views in Select Query

    Need Assistance,
    Hi all,
    My database having many views. while i am joining the views in a select query increase the cost of the querys due to the complex joins in the conditions.
    While checking the select query with views individualy taking less cost.
    Does any hint or query writing method is availabe to avoid the merging of the execution plan of the views?
    I have browsed many related to the mentioned issues,couldn't found any thing that helps me.
    Please help me on this issue,it will be very much helpfull for me.
    Thanks,
    Senthur

    Please read the two threads linked to in the FAQ: {message:id=9360003} and post the relevant details they request, so that people can help you better with your issue.
    We cannot help if you just say "my query is slow what do I do to fix it" as we cannot see your queries, your data, or any other information we would need to help. If the answer was that simple, it would be built into oracle so that the optimiser would fix it for you.

  • Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query

    Hi All,
    There is a Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query in a report painter.
    This query is working fine when executed in 4.7 system where as it is running for more time in ECC6.0.
    Select query is on the table COSP.
    SELECT (FIELD_LIST)
            INTO CORRESPONDING FIELDS OF TABLE I_COSP PACKAGE SIZE 1000
            FROM  COSP CLIENT SPECIFIED
            WHERE GJAHR IN SELR_GJAHR
              AND KSTAR IN SELR_KSTAR
              AND LEDNR EQ '00'
              AND OBJNR IN SELR_OBJNR
              AND PERBL IN SELR_PERBL
              AND VERSN IN SELR_VERSN
              AND WRTTP IN SELR_WRTTP
              AND MANDT IN MANDTTAB
            GROUP BY (GROUP_LIST).
       LOOP AT I_COSP      .
         COSP                           = I_COSP      .
         PERFORM PCOSP       USING I_COSP-_COUNTER.
         CLEAR: $RWTAB, COSP                          .
         CLEAR CCR1S                         .
       ENDLOOP.
    ENDSELECT.
    I have checked with the table indexes, they were same as in 4.7 system.
    What can be the reson for the difference in execution time. How can this be reduced without adjusting the select query.
    Thanks in advance for the responses.
    Regards,
    Dedeepya.

    Hi,
    ohhhhh....... lots of problems in select query......this is not the way you should write it.
    Some generic comments:
    1. never use SELECT
                       endselect.
       SELECT
      into table
       for all entries in table
      where.
       use perform statment after this selection.
    2. Do not use into corresponding fields. use exact structure type.
    3. use proper sequence of fields in the where condition so that it helps table go according to indexes.
        e.g in your case
              sequence should be
    LEDNR
    OBJNR
    GJAHR
    WRTTP
    VERSN
    KSTAR
    HRKFT
    VRGNG
    VBUND
    PARGB
    BEKNZ
    TWAER
    PERBL
    sequence should be same as defined in table.
    Always keep select query as simple as possible and perform all other calculations etc. afterwords.
    I hope it helps.
    Regards,
    Pranaya

  • Error While Firing select Query  on Table

    Hi aill,
    we have Oracle 11g RG2 RAC on Production Machine. When I am firing select query on one partiton table,it will show me below error in Alter Log file :
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x0] [PC:0x84056AA, kkpamDInfo()+38] [flags: 0x0, count: 1]
    Errors in file /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/trace/WINSDB2_ora_29686.trc (incident=288563):
    ORA-07445: exception encountered: core dump [kkpamDInfo()+38] [SIGSEGV] [ADDR:0x0] [PC:0x84056AA] [Address not mapped to object] []
    Incident details in: /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/incident/incdir_288563/WINSDB2_ora_29686_i288563.trc
    While checking the trace file :
    ========== FRAME [2] (ksedst1()+98 -> skdstdst()) ==========
    defined by frame pointers 0x2ba371efaa40 and 0x2ba371efa990
    CALL TYPE: call ERROR SIGNALED: no COMPONENT: KSE
    RDI 0000000000000000 RSI 0000000000000000 RDX 00002BA371EF6118
    RCX 0000000000000001 R8 0000000000000000 R9 0000000000000000
    RAX 0000000000000000 RBX 0000000000000003 RBP 00002BA371EFAA40
    R10 71EFA9A000000000 R11 0000000000000000 R12 0000000000000003
    R13 0000000000000003 R14 0000000000000001 R15 0000000000000001
    RSP 00002BA371EFA9A0 RIP 000000000349E72E
    Dump of memory from 0x2ba371efaa40 to 0x2ba371efaaf0
    2BA371EFAA40 71EFAB10 00002BA3 0349E77F 00000000 [...q.+....I.....]
    2BA371EFAA50 00000000 00000000 00000000 00000000 [................]
    2BA371EFAA60 71B996F0 00002BA3 02050034 00000000 [...q.+..4.......]
    2BA371EFAA70 000000FF 00002BA3 00002004 00000000 [.....+... ......]
    2BA371EFAA80 00000000 00000000 2338D058 00016DAB [........X.8#.m..]
    2BA371EFAA90 00000003 00000000 085232F3 00000000 [.........2R.....]
    2BA371EFAAA0 0000000D 00000000 00000002 00000000 [................]
    2BA371EFAAB0 00000000 00000000 00000000 00000000 [................]
    2BA371EFAAC0 71EFAAD0 00002BA3 085BBFCF 00000000 [...q.+....[.....]
    2BA371EFAAD0 71EFAB10 00002BA3 0349E249 00000000 [...q.+..I.I.....]
    2BA371EFAAE0 00000000 00002BA3 00000013 00000000 [.....+..........]
    Can Anyone guide me for above Errors. How can I resolve the same.

    A quick search of Oracle Support shows that there are a handful of bugs that match ORA-07445 with an argument of kkpamDInfo()+38.
    Whether yours is already identified and patched depends on the exact version of 11.2 and the specific circumstances.
    If you're on 11.2.0.1 then this might be part of what sounds like quite a big bucket of such errors - Bug 9399991 relating to errors and dumps with SQL against partitioned tables.

  • Select query taking more time..

    Hi friends..
    The below inner join statement is taking more time ,  can any  body sugget me to improve the performance . I tried FOR ALL ENTRIES also but that also taking more time than inner join statement .
    SELECT a~vbeln from vbap as a inner join vakpa as b
          on avbeln = bvbeln
          into corresponding fields of table IT_VAKPA
          where a~WERKS IN S_IWERKS
          and a~pstyv NE 'ZRS'
          and b~vkorg = IVKORG
          and b~audat IN IAUDAT
          and b~vtweg IN IVTWEG.
    Regards
    Chetan

    Hi Chetan ,
    VAKPA is an index table. From the select query , it has been observed that you are not fetching any data from VAKPA. Only you have added some selection paramenters in where clause of select query.
    My suggestion will be instead of using VAKPA in inner join you use VBAK along with VBAP. All the fields that you are using as selection condition from VAKPA are there in VBAK.
    I am sure performance of query will be improved.
    If still duo to business logic you need to use VAKPA, try to create secondary non unique index on fields VKORD,AUDATand VTWEG on table VAKPA.
    However I will recommend you to go for first option only. If this does not work then go for second option.
    Hopfully this will help you.
    Regards,
    Nikhil

  • BSAD table is taking more time in select query.

    Hi ,
    The below SELECT query is taking more time , there is no any secondary index is there .
    Can anybody suggest how to improve it .
    SELECT bukrs
             kunnr
             augdt
             augbl
             gjahr
             belnr
             budat
             bldat
             waers
             xblnr
             BLART
             monat
             shkzg
             gsber
             DMBTR
             WRBTR
             prctr
             FROM  BSAD INTO TABLE gt_bsad
             WHERE  bukrs  = p_bukrs
             AND    kunnr  IN so_kunnr
             AND    budat  IN so_budat
             AND    xblnr  IN so_xblnr
             AND  ( blart  EQ 'DA' OR
                    blart  EQ 'DZ' OR
                    blart  EQ 'ZP' OR               "D03K904574
                    blart  EQ 'KZ' OR               "D03K904574
                    blart  EQ 'DP' )
             AND   PRCTR IN R_PC.
    Thanks in advance
    Regards
    chetan

    Hi Chetan ,
    I will suggest you two things :
    1. Try to add Secondary ( Non-unique) index on table BSAD with fields : mandt,bukrs,kunnr,budat,xblnr,blart,prctr.
        but before adding this index test the selectivity of this index by going to Tcode DB05
    2. In the select query you have used OR condition for blart. Instead of this try to create a ranges table for blart and append the  values 'DA','DZ','ZP','KZ','DP' and use this in the select query. This will improve the performance for sure.
    Hope this will help to ypu.
    Regards,
    Nikhil

  • Select query taking Much time

    Dear all ,
    I am fetching data from pool table a006.  The select query is mentioned below.
    select * from a005 into table i_a005 for all wntries in it_table
                 where  kappl  = 'V'
                 and      kschl   IN  s_kschl
                 and     vkorg   in   s_vkorg
                 and     vtweg  in   s_vtgew
                 and     matnr   in s_matnr
                 and    knumh  =  it_table-knumh .
    here every fields are primary key fields except one field knumh which is comparing with table it_table. Because of these field this query is taking too much time as KNUMH is not primary key. And a005 is pool table . So , i cant create index for same. If there is alternate solutions , than please let me know..
    Thank You ,
    And in technical setting of table ITS Metioned as Fully buffered and size category is 0 .. But data are around 9000000. Is it issue or What ?  Can somebody tell some genual reason ? Or improvement in my select query.........
    Edited by: TVC6784 on Jun 30, 2011 3:31 PM

    TVC6784 wrote:
    Hi Yuri ,
    >
    > Thanks for your reply....I will check as per your comment...
    > bUT if i remove field KNUMH  From selection condition and also for all entries in it_itab ,  than data fetch very fast As KNUMH is not primary key..
    > .  the example is below
    >
    > select * from a005 into table i_a005
    > where kappl = 'V'
    > and kschl IN s_kschl
    > and vkorg in s_vkorg
    > and vtweg in s_vtgew
    > and matnr in s_matnr.
    >
    > Can you comment anything about it ?
    >
    > And can you please say how can i check its size as you mention that is  2-3 Mb More   ?
    >
    > Edited by: TVC6784 on Jun 30, 2011 7:37 PM
    I cannot see the trace and other information about the table so I cannot judge why the select w/o KNUMH is faster.
    Basically, if the table is buffered and it's contents is in the SAP application server memory, the access should be really fast. Does not really matter if it is with KNUMH or without.
    I would really like to see at least ST05 trace of your report that is doing this select. This would clarify many things.
    You can check the size by multiplying the entries in A005 table by 138. This is (in my test system) the ABAP width of the structure.
    If you have 9.000.000 records in A005, then it would take 1,24 Gb in the buffer (which is a clear sign to unbuffer).

Maybe you are looking for

  • Get only one row for each kind of a column

    hi there! i have a little problem. I have a table with 10 columns. One of them has repeated values. My goal is to get all the rows with this column only one time for each values that it has. Ex: Col1 Col2 Col3 A A A B B B C A C D C D Column 2 has rep

  • 16:9 display problems

    Having shot a project in 16:9SD and edited it as a 16:9 anamorphic project in Final Cut Pro 5 I prepared a widescreen iDVD project for burning. I also added a previously made 4:3 project to the dvd project. The burned disc displays the menus without

  • How to get 2 up page view in portfolio

    I have created a portfolio of 82 pages and am trying to get the view changed to start with the first page and then open up like a book with facing pages.  I have set the initial view to "2 up" and saved the file this way, but it still shows as single

  • Case Sensitive ColumnNames

    Hello, When I have the following query as example: select sysdate "SystemDateTime" from dual; Retrieving the table columnname with MetaData::ATTR_NAME gives me "SYSDATETIME" in stead of "SystemDateTime". It doesn't give a case sensitive table columnn

  • Assign transport request to translations in smartforms

    hi all, i have created a smart form in eight different languages and trying to assign it to one transport request. how can i assign different translations of the same smart forms to only one request. Regards, Rajat magoo