Database table Analyze

<p>
{color:#339966}Hi,
I have a very basic question.
I want to know what exactly happens in the Database architecture when a table analyze is done by gathering the stats.
How does this analyze helps in performance of queries.
Thanks
Mns{color}
</p>

hi,
Table analyze is done to get the internal details for the table like exact space used,exact blocks used,row chaining etc.
optimizer uses these details in creating execution plan for the statements for that table.
SQL> set lines 10000
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP
SQL> analyze table emp compute statistics;
Table analyzed.
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP 14 1 0 40
Regards
Edited by: NKU on Nov 5, 2008 12:28 AM

Similar Messages

  • Forms 6i Database Tables

    Hi there: I have installed Forms 6i Database Tables and I am able to save and retrieve forms to and from the database. Any of you have the catalog of these Forms Tables? Do you the names of the tables storing blocks, canvas, items, etc?
    In Forms4.5 it is very easy because I have a table for blocks and for many other items of the form, but it seems to be hidden in forms 6i.
    Any help would be greatly appreciated.
    Regards

    I don't think there is any description of the tables other than what you can get from the CREATE TABLE scripts.
    PS. Are you sure you still want to go the route of storing the Forms in the database. Be advised that this feature was dropped from later versions. So if you're ever going to upgrade to a later version you will have to extract all of them from the database anyhow.
    PS2. If you want to "analyze" the Forms, I personally use the Forms to XML conversion available in Forms 10gR1, 10gR2 (and perhaps 9i). This converts your FMB to a very readable XML file which you can use for analysis. It could be an option to convert the 6i FMB file to XML with a newer version of Oracle Forms. Be sure that the batch file does not save the existing FMB as it would upgrade it to a new file format and you could not open it with Forms 6i any more. Take a backup first.

  • Database table could not be deleted or recreated!

    Hi Experts,
    In process chain (Daily Load) during the deletion of contents from data target step i am facing an error "Drop cube failed in data target" & "Database table /BIC/F.... could not be deleted or recreated".
    Generally we face this error once or twice in a month and the simple solution we follow is just repeat the step and it gets finished successfully.
    Here my concern is that i want to know the root cause for the same or what are the possibilities for this kind of error.
    Can anyone please help me out in finding the root cause of how to analyze this kind of issues.
    with regards,
    musai

    Hi ,
    Please visit following link :
    Restarting Processchains
    Process Chain: complete deletion of data target contents
    Error deleting data from an InfoCube
    Regards,
    Jaya

  • Table Analyze Automatically

    Hi,
    My database in 10g Linux envirnoment, I have found that some of the tables in database are analyze autometically.
    Is it possible in 10g that oracle will analyze the tables autometically at perticular time.
    Please help.
    Anand

    By default, 10g ships with a DBMS_SCHEDULER job that automatically gathers statistics when Oracle considers the statistics stale. If you did not disable this job, it would be expected that Oracle would gather statistics automatically during the nightly maintenance window.
    Justin

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Help needed in reading text file to database table

    Hello experts,
    i have to insert the values from the column of this text file and insert them in my database table.
    I have done a few file to table insertions but i'm having some trouble with this one.
    Any suggestions plz
    thanks
    liab_report      1.00                                                                                                                              Page: 1
    CDC:00537 / Mon Jun-21-2010                           LIABILITY REPORT                               Mon Jun-21-2010 22:06:26
    DRAW    1; SET    1;  November 7, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         701040.00          0.00     660146.00          0.00      40894.00    0.00          0.00
        Div3        1444128.00          0.00    1330056.00          0.00     114072.00    0.00          0.00
        Div4        4711900.00          0.00    3889700.00          0.00     822200.00    0.00          0.00
                    6857068.00          0.00    5879902.00          0.00     977166.00    0.00          0.00
    DRAW    2; SET    1;  November 14, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         817817.00          0.00     817817.00          0.00          0.00    0.00          0.00
        Div3        1687405.00          0.00    1611742.00          0.00      75663.00    0.00          0.00
        Div4        3402100.00          0.00    3034200.00          0.00     367900.00    0.00          0.00
                    5907322.00          0.00    5463759.00          0.00     443563.00    0.00          0.00
    DRAW    3; SET    1;  November 21, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         779933.00          0.00     769804.00          0.00      10129.00    0.00          0.00
        Div3        1605548.00          0.00    1525104.00          0.00      80444.00    0.00          0.00
        Div4        4891700.00          0.00    4256800.00          0.00     634000.00    0.00        900.00
                    7277181.00          0.00    6551708.00          0.00     724573.00    0.00        900.00

    Plz clarify whether u want to load text file as a file into database or value of this text file into database. If values are to be loaded from this text file, U can better format the text file and use SQL loader to load the file into database. By formatting the database, i mean remove the unnecessary headings and characters, kee only the values to be loaded idelimited by ' '(space) or ','(comma). Create a control file and load it into the target table.

  • Displaying data in a tree from database table

    Hi,
    I want to display data from a database table (mara-matnr) in a tree structure. I went through the coding of SBSPEXT_HTMLB. There static data was taken in to wa_tab. But there I want to bring data from a database table into wa_tab. For this I created an internal table without headerline by taking a work area, now how can I move data from this work area to wa_tab record by record.
    I hope some one might have worked on this. Plz help me....
    Thanks in advance,
    Ravindra.

    Hi,
    take a look at this <a href="/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp which explains how internal tables work in ABAP OO.
    Furthermore I think you want to do this:
    insert <yourWorkarea> into table wa_tab.
    A complete mara example would be:
    data tab_mara type table of mara.
    data wa_mara type mara.
    select * from mara into table tab_mara.
    *or you can use:
    select * from mara into wa_mara.
       insert wa_mara into table tab_mara.
    endselect.
    regards
    Thomas

  • Sending data from SAP-BW ODS to R/3 database table/ view

    I need to store data in an ODS in BW from an oracle view & then send this data to SAP R/3 so that the same data can be used by SAP-ABAP for making a BDC program ( i.e. finally storing it in some database tables in R/3).
    Is it possible to do that?? if yes then how.....??

    Hi,
    Yes it is possibel.
    Use SAP PI ie XI which will send the data from BW to ur R/3 system.
    Check the links about XI.
    XI is a Integration broker. U can integrate any systems using XI.
    REDDY

  • Database Table cannot be found when Verify Database

    Post Author: brentlaw
    CA Forum: Other
    I have been using CRW 7 for many years.  I recently upgraded to XI (I have current version).  I can open existing reports and create new reports fine.  The problem is when I Verify Database I get an error message "The Database table <tablename here> cannot be found. Remove this table from the report". 
    This happens to all existing and new created reports.  The data fills correctly when previewing.  The problem only occurs when Verifying Database. 
    I thought it might be an ODBC driver problem so I upgraded my driver to v 3.525.1117.  At least I think I upgraded it I did not check the version before I installed SQL 2005 SP2.  After installing SP2 it seemed to be fine but a week later the problem came back.  Mysterious eh?
    I am trying to launch a report from VB6 using RDC and rpt file.  I get logged in correctly but at .viewreport I get a generic error message.  I am assuming the problem is related the the issue I raise in this forum post.

    Post Author: brentlaw
    CA Forum: Other
    I fixed the problem.  In CR XI Developer Designer window I opened up Database-SetDataSourceLocation.  I noticed that in "Properties" the last item "Use DSN Default Properties": was set to True.  I changed this value to False.  Now this problem is solved.
    I am Not using Windows Authentication I am using SQLServer authentication.  In my code I was passing SQLServer Authentication credentials. 
    I opened up all of my CR 7 reports in CR XI and changed this setting on both the Main and the Subreort property in the SetDataSourceLocation dialog box and now all my reports work.  I am a happy camper.
    I don't know if this is a CR 7 conversion to CR XI only situation or not.  Hope this information helps someone else.

  • Database table update issue

    Hello experts, Need your Help...
    I am trying to update database table using Update command. And I am doing COMMIT WORK AND WAIT. after the successful update.
    But my code sometimes does not work and the table is not updated.
    Sometimes the code works and sometimes not.. for the same data.
    Can anybody think of any possible reason?
    Thanks in advance,
    --Kumail

    Hello Guys,
    Here is the code, here we have all the keys... as it updates correctly sometimes. But doesnt update sometimes... for same data...... I have added COMMITT and WAIT statements to solve this problem.... but no luck....
            UPDATE zfxx_bsr_data
                SET zfxxstatus_glr  = zfxx_bsr_data-zfxxstatus_glr
                zfxxstatus_issue = zfxx_bsr_data-zfxxstatus_issue
                    zfxxerdat_glr   = sy-datum
                    zfxxuser_glr    = sy-uname
                    zfxxremark_glr  = zfxx_bsr_data-zfxxremark_glr
                    zfxxertime_glr  = sy-uzeit
                  doc_ind         = w_doc_ind                  
                  zfxx_attach_acc = w_zfxx_att_acc      
              WHERE bukrs        EQ t001-bukrs
              AND   saknr        EQ zfxx_bsr_data-saknr
              AND   zfxxperiod   EQ zfxx_bsr_data-zfxxperiod
              AND   zfxxfield    EQ c_ba
              AND   zfxxfieldval EQ tgsb-gsber.
            IF sy-subrc EQ 0.
              WAIT UP TO 3 SECONDS.
              COMMIT WORK.
              WAIT UP TO 3 SECONDS.
            ENDIF.

  • Database table problem

    hi expert,
    I have one expert routine with insert command in it. While DTP are running I change the status request to green, but after that I run again and the system can not insert record to database table. I wait for along time and system can perform insert command again to this database table. But again if I change the status to green when DTP request have not finished, the system can not perform insert command. Is the database table is lock or what? and How can I perform insert command immediately after stopping process.

    Hi bwaugh06      
    You may use a text edit control instead od table control and store the content in a field of type STRING: No space wasted if no data is there but you have unlimited length.
    Regards,
    Clemens

  • Database Table Modification!

    Hi!
        I want to change database table i.e for e.g a table contains 10 fields with data in database i want to add 3 more fields to that table so that the data should not be removed or changed & after i ve added the fields i want to insert records to the 3 fields i ve created to the corresponding record.
      Can u pls tell me how to achieve this task.
      Thanks

    hi Rahul,
      Do this way ...
    Goto se11 and enter the name of the table in which you want to enter the fields,
    enter the fields and if any error occurs just goto UTILITIES->DATABASE UTILITY-> ACTIVATE AND ADJUST DATABASE.....
    Also see the links,
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/frameset.htm
    Regards,
    Santosh

  • Can't drop database table objects on a EJB Diagram.

    JDeveloper 10.1.3 EA.
    When I drop a database table object on a EJB Diagram the error below occurs. Also dropping components from the Component Palette doesn't work. A wizard opens, but after completing that, nothing is on the EJB Diagram.
    However, after dropping a table and a restart of JDeveloper, there is an empty 'tablename EJB' on the EJB Diagram, but a click with the mouse on it generates the same error as the drop did.
    Simular errors occur with JDeveloper 10.1.2, so writing this I realize that this might be a database version problem. I'm using 9i! I'll try 10g and see what happens.
    Message
    BME-99003: An error occurred, so processing could not continue.
    Cause
    The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.NullPointerException
         at oracle.jdevimpl.xml.DescriptorNode.getWhitespaceHandler(DescriptorNode.java:349)
         at oracle.jdevimpl.xml.DescriptorNodeDomIO.load(DescriptorNodeDomIO.java:164)
         at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)
         at oracle.jdevimpl.xml.DescriptorNode.getNewDescriptorImpl(DescriptorNode.java:506)
         at oracle.jdevimpl.xml.DescriptorNode.getDescriptor(DescriptorNode.java:140)
         at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarNode.getOrionEjbJar(OrionEjbJarNode.java:145)
         at oracle.jdeveloper.ejb.BaseEjbModuleContainer.getOrionEjbJar(BaseEjbModuleContainer.java:476)
         at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJB21Handler.isAvailable(Unknown Source)
         at oracle.bm.diagrammer.ui.DropChooserPanel.populateOptions(Unknown Source)
         at oracle.bm.diagrammer.ui.DropChooserPanel.createComponents(Unknown Source)
         at oracle.bm.diagrammer.ui.DropChooserPanel.<init>(Unknown Source)
         at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.createPanel(Unknown Source)
         at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjects(Unknown Source)
         at oracle.bm.addinUtil.IDEAppContext$4.performAction(Unknown Source)
         at oracle.bm.diagrammer.LockMonitor.performLockedAction(Unknown Source)
         at oracle.bm.diagrammer.BaseDiagram.performDiagramLockedAction(Unknown Source)
         at oracle.bm.addinUtil.IDEAppContext.dropNavigatorNodeLater(Unknown Source)
         at oracle.bm.addinUtil.IDEAppContext$5.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Action
    If further errors occur, you should restart the application.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.
    ________________________________________________________________________________

    Hi lisa, you've said that the problem does not occur in the 10.1.3 build but I have almost the same problem with the BME-99003 error message.
    I used the same workaround "changing the regional settings from BE to US" and the BME-99003 problem disappears :-)
    Here is the error message that I receive while I add a table into the EJBDiagram. I'm using
    windows XP SP2
    ADF Business Components     10.1.3.34.12
    Java™ Platform     1.5.0_04
    Oracle IDE     10.1.3.34.12
    Struts Modeler Version     10.1.3.34.12
    UML Modelers Version     10.1.3.34.12
    Versioning Support     10.1.3.34.12
    Abdelkrim BOUJRAF
    Message
    BME-99003: An error occurred, so processing could not continue.
    Cause
    The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.NullPointerException
    at oracle.jdevimpl.xml.DescriptorNode.getWhitespaceHandler(DescriptorNode.java:349)
    at oracle.jdevimpl.xml.DescriptorNodeDomIO.load(DescriptorNodeDomIO.java:164)
    at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)
    at oracle.jdevimpl.xml.DescriptorNode.getNewDescriptorImpl(DescriptorNode.java:506)
    at oracle.jdevimpl.xml.DescriptorNode.getDescriptor(DescriptorNode.java:140)
    at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarNode.getOrionEjbJar(OrionEjbJarNode.java:145)
    at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarHelper.findOrionEjbJar(OrionEjbJarHelper.java:82)
    at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarHelper.findOrCreateOrionEjbJar(OrionEjbJarHelper.java:73)
    at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJBCommonHandler.processTableNodes(Unknown Source)
    at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJB21Handler.processTableNodes(Unknown Source)
    at oracle.bm.typemodel.dropHandler.TableDropSubHandler.processDBObjectNodes(Unknown Source)
    at oracle.bm.typemodel.dropHandler.DBObjectDropSubHandler.processObjects(Unknown Source)
    at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjectsImpl(Unknown Source)
    at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjects(Unknown Source)
    at oracle.bm.addinUtil.IDEAppContext$4.performAction(Unknown Source)
    at oracle.bm.diagrammer.LockMonitor.performLockedAction(Unknown Source)
    at oracle.bm.diagrammer.BaseDiagram.performDiagramLockedAction(Unknown Source)
    at oracle.bm.addinUtil.IDEAppContext.dropNavigatorNodeLater(Unknown Source)
    at oracle.bm.addinUtil.IDEAppContext$5.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Action
    If further errors occur, you should restart the application.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.

  • Database table 'e' is not accessible

    Hi all,
    like many others in the web I'm having problems deploying CMP Beans on BEA. I'm using Weblogic 8.1 and
    get the following error message:
    "[EJB:011076]Unable to deploy the EJB 'B' because the database table 'b' is not accessible. Please ensure that this table exists and is accessible."
    After a lot of research I understand the problem now. Weblogic is checking the cmp-fields at deployment time using something like "SELECT xx1, xx2, xxx3 FROM ttt1 WHERE 1 = 0". Some databases have no problem with such a select. My Solid database unfortunately does a full table scan on it. Having only some rows in the table b there is no problem at all, but I have more than 500.000 entries. :-(
    My question: Is there a workaround? Can I somewhere specify the SQL - command for checking mapped cmp-fields? Or can I disable the check somehow?
    I think it is a very annoying problem, many users out there have.
    Thanx in advance
    Robert

    Robert Jung wrote:
    Hi all,
    like many others in the web I'm having problems deploying CMP Beans on BEA. I'm using Weblogic 8.1 and
    get the following error message:
    "[EJB:011076]Unable to deploy the EJB 'B' because the database table 'b' is not accessible.Please ensure that this table exists and is accessible."
    >
    After a lot of research I understand the problem now. Weblogic is checking the cmp-fieldsat deployment time using something like "SELECT xx1, xx2, xxx3 FROM ttt1 WHERE 1 = 0".
    Some databases have no problem with such a select. My Solid database unfortunately does
    a full table scan on it. Having only some rows in the table b there is no problem at all,
    but I have more than 500.000 entries. :-(
    >
    My question: Is there a workaround? Can I somewhere specify the SQL - command for checkingmapped cmp-fields? Or can I disable the check somehow?
    I think it is a very annoying problem, many users out there have.Hi. All commercial quality DBMSes I know, are smart enough to evaluate constant search
    criteria, and not to access all the rows if it's a-priori known that no rows will
    qualify. I would ask 'Solid' for a fix.
    However, you can generate our EJBs with the option of retaining the generated
    JDBC code, which you could alter and recompile for your use. You might be able to
    substitute some DatabaseMetaData call to getTableColumns() to get the same info...
    Joe
    Thanx in advance
    Robert

  • Database table entries not getting viewed on SAP Screen

    Hi
    I have created Z-Code to update a standard SAP table.  After executing my program I can see my desired entries in that SAP database table but when I am trying to view that same entries in SPRO I am not able to view it there.
    Am I missing something? Even if my entries are coming in SAP database table do I need to do something extra to view them on SAP screen.
    Thanks
    Tushar

    >
    Tushar Gawande wrote:
    > Hi
    > I have created Z-Code to update a standard SAP table.  After executing my program I can see my desired entries in that SAP database table but when I am trying to view that same entries in SPRO I am not able to view it there.
    > Am I missing something? Even if my entries are coming in SAP database table do I need to do something extra to view them on SAP screen.
    > Thanks
    > Tushar
    /slap your hands
    You're missing some common sense and the knowledge to be tasked to do such a thing. And the person/consultant who gave you this task as well.

Maybe you are looking for