What analyze table command will do exactly?

Hi,
Can any one tell me what this analyze table command will do when we execute it??? Please help me out.
Cheers,
Senthil

Which database version?
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4005.htm#i2086320
See the NOTE on that link.
Basically, unless there is a bug in DBMS_STATS where the recommended workaround is to use ANALYZE use DBMS_STATS instead.

Similar Messages

  • Analyze table command

    what is Analyze table command,please clear with example,using this command how to find how many rows in table

    Manual pages for Analyze command.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4005.htm#i2086320
    Pay special attention to the part where it says Oracle strongly recommends using dbms_stats package from now on instead of analyze.
    You can find out the number of rows in the table by doing a select count(*) from the table. Or, if the most recent statistics are good enough, you can look at user_tables (in the num_rows column).

  • Analyze table after insert a large number of records?

    For performance purpose, is it a good practice to execute an 'analyze table' command after inserting a large number of a records into a table in Oracle 10g, if there is a complex query following the insert?
    For example:
    Insert into foo ...... //Insert one million records to table foo.
    analyze table foo COMPUTE STATISTICS; //analyze table foo
    select * from foo, bar, car...... //Execute a complex query whithout hints
    //after 1 million records inserted into foo
    Does this strategy help to improve the overall performance?
    Thanks.

    Different execution plans will most frequently occur when the ratio of the number of records in various tables involved in the select has changed tremendously. This happens above all if 'fact' tables are growing and 'lookup' tables stayed constant.
    This is why you shouldn't test an application with a small number of 'fact' records.
    This can happen both with analyze table and dbms_stats.
    The advantage of dbms_stats is, it will export the current statistics to a stats to table, so you can always revert to them using dbms_stats.import_stats.
    You can even overrule individual table and column statistics by artificial values.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • Sql slow afterweekly STATS-JOB,then run analyze table it is fast again

    Oracle R11.2.0.2 :
    I hade some slow sql / reports and found the effect,
    that the sql is slow obvious after the weekend ,
    when STATS - JOB BSLN_MAINTAIN_STATS_JOB and other Jobs were running weekly on SYS.
    I did run dbms_stats.GATHER_TABLE_STATS on schema
    it doesn't help.
    But when
    run ANALYZE TABLE afterwards on only one or two tables of the schema
    the sql / reports performance is well and fast.
    in the dba_tables I can see the last_analyze - date
    and in GLOBAL_STATS = NO ( when Table runs with ANALYZE ),
    GLOBAL_STATS = YES( when Table runs with STATS )
    what does the ANALYZE TABLE command doing good and let my sql run well and fast,
    while dbms_stats.GATHER_TABLE_STATS
    seems not work well in this situation ?
    regards

    astramare wrote:
    Oracle R11.2.0.2 :
    I hade some slow sql / reports and found the effect,
    that the sql is slow obvious after the weekend ,
    when STATS - JOB BSLN_MAINTAIN_STATS_JOB and other Jobs were running weekly on SYS.
    I did run dbms_stats.GATHER_TABLE_STATS on schema
    it doesn't help.
    What options do you use for the gather_stats command ?
    Do you also have collected system stats?
    But when
    run ANALYZE TABLE afterwards on only one or two tables of the schema
    the sql / reports performance is well and fast.Analyze table is deprecated, but still does its work for some part. It is not as complete as dbms_stats
    >
    in the dba_tables I can see the last_analyze - date
    and in GLOBAL_STATS = NO ( when Table runs with ANALYZE ),
    GLOBAL_STATS = YES( when Table runs with STATS )
    It must have to do something with the way you use it..
    HTH
    FJFranken

  • Which Get command will display all $True & $False parameters

    Hi,
    I am a newbie when it comes to commands in the EMC.  We have Exchange 2010.  I have 2 mailboxes that should do the same thing but they do not.  Both are calendar mailboxes (resource mailboxes I think maybe) and one mailbox is working correctly
    and the other is not.
    I would like to go into the EMC and run some commands to compare the settings of both mailboxes.  However if I run the Get-Mailbox command I only get one line of info back. (I am not actually sure what the correct Get-Mailbox??? command is at this time,
    I have that on my work computer).
    I would like to know what Get-Mailbox command will display all of the $True and all of the $False parameters.  I have seen these displayed on websites while trying to troubleshoot this issue, but I haven't seem the command posted that returns all of
    this information, I need that command!
    I hope I made sense, I can explain further if needed.  Thanks in advance!

    What is the command that will output this...
    RunspaceId                          : aa671879-75ca-4961-a103-4dcd35254689
    AutomateProcessing                  : AutoAccept
    AllowConflicts                      : False
    BookingWindowInDays                 : 180
    MaximumDurationInMinutes            : 1440
    AllowRecurringMeetings              : True
    EnforceSchedulingHorizon            : True
    ScheduleOnlyDuringWorkHours         : False
    ConflictPercentageAllowed           : 0
    MaximumConflictInstances            : 0
    ForwardRequestsToDelegates          : True
    DeleteAttachments                   : True
    DeleteComments                      : True
    RemovePrivateProperty               : True
    DeleteSubject                       : True
    AddOrganizerToSubject               : True
    DeleteNonCalendarItems              : True
    TentativePendingApproval            : True
    EnableResponseDetails               : True
    OrganizerInfo                       : True
    ResourceDelegates                   : {}
    RequestOutOfPolicy                  : {}
    AllRequestOutOfPolicy               : False
    BookInPolicy                        : {}
    AllBookInPolicy                     : True
    RequestInPolicy                     : {}
    AllRequestInPolicy                  : False
    AddAdditionalResponse               : False
    AdditionalResponse                  :
    RemoveOldMeetingMessages            : True
    AddNewRequestsTentatively           : False
    ProcessExternalMeetingMessages      : True
    RemoveForwardedMeetingNotifications : False
    MailboxOwnerId                      : offwire.com/Offwire Users/Exchange/Exchange Resources/Resource - K2
    Identity                            : offwire.com/Offwire Users/Exchange/Exchange Resources/Resource - K2
    IsValid                             : True
    I ran the command you mentioned above (thank you!) and it gave back a lot of info that I am going to go through right now.  But I was wondering what the command would be to output this data?

  • What will be exact command instead of (archivelog from time 'SYSDATE-3';)

    HI all;
    rman configuration
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS and others is default
    i am taking weekly archivelog backup by following script
    run
    backup as compressed backupset
    device type disk
    tag "weekly_archivelog"
    format '/sw/weekly_archivelog_%d_t%t_c%c_s%s_p%p'
    archivelog from time 'SYSDATE-7';
    and
    i am taking daily archivelog backup by following script
    run
    backup as compressed backupset
    device type disk
    tag "daily_archivelog"
    format '/sw/daily11_archivelog_%d_t%t_c%c_s%s_p%p'
    archivelog from time 'SYSDATE-3';
    i want to ask about daily backup script.mainly (archivelog from time 'SYSDATE-3';),,,,,,,it is taking daily 3 days archivelog backup
    what will be exact command instead of (archivelog from time 'SYSDATE-3';)

    I assume you mean so that the daily doesn't constantly re-backup an archivelog that was already backed up?
    If so, you could use the following:
    run
    backup as compressed backupset
    device type disk
    tag "daily_archivelog"
    format '/sw/daily11_archivelog_%d_t%t_c%c_s%s_p%p'
    archivelog all not backed up 1 times;
    }or you could CONFIGURE BACKUP OPTIMIZATION ON or consider using DELETE INPUT to avoid the multiple backup of the same archivelogs.

  • What hide command will do

    what hide command will do

    Here is the F1 help.....
    <i>HIDE
    Basic form
    HIDE f.
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Constants not allowed in HIDE area.
    Effect
    Retains the contents of f related to the current output line. When the user selects the line from the list f is automatically filled with the retained value.
    The selection can occur in:
    AT LINE-SELECTION
    AT PFx
    AT USER-COMMAND
    READ LINE
    The contents of the field do not have to have been displayed using WRITE in order for you to retain them.
    The HIDE statement does not support deep structures (structures that contain internal tables).
    Useful system fields for interactive reporting are listed in the System Fields for Lists documentation.
    Note
    Lines or components of lines of an internal table that you address using a field symbol (see ASSIGNING addition to the READ and LOOP statements), cannot be retained using HIDE. You can store them using a global variable instead.
    Note
    Runtime errors:
    HIDE_FIELD_TOO_LARGE: The field is too long for HIDE.
    HIDE_ON_EMPTY_PAGE: HIDE not possible on an empty page.
    HIDE_NO_LOCAL: HIDE not possible for a local field.
    HIDE_ILLEGAL_ITAB_SYMBOL: HIDE not possible for a table line or component of a table line.</i>
    and also a sample program.
    report zrich_0003.
    data: begin of itab occurs 0,
          field type c,
          end of itab.
    itab-field = 'A'.  append itab.
    itab-field = 'B'.  append itab.
    itab-field = 'C'.  append itab.
    itab-field = 'D'.  append itab.
    itab-field = 'E'.  append itab.
    loop at itab.
      format hotspot on.
      write:/ itab-field.
      hide itab-field.
      format hotspot off.
    endloop.
    at line-selection.
      write:/ 'You clicked', itab-field.
    It kind of "remembers" what is written, so that when you click on it, it knows what the value is.
    Please remember to award points and mark as solved if  your question has been answered.  Thanks.
    Regards,
    Rich Heilman
    Message was edited by: Rich Heilman

  • What is the use of delet set up table in lo **** pit, exactly what happenda

    what is the use of delete set up table in lo **** pit, exactly what happened if we do the process, is all tables will lose their data which r available in functional module,
    Why i'm asking this, because we assign functional module in LBWG.
    plz .......
    thanx
    vidhu

    HI Vidhu,
    Initially we don't delete the setup tables but when we do change in extract structure we go for it. We r changing the extract structure right, that means there are some newly added fields in that which r not before. So to get the required data (i.e.; the data which is required is taken and to avoid redundancy) we delete n then fill the setup tables.
    To refresh the statistical data. The extraction set up reads the dataset that you want to process such as, customers orders with the tables like VBAK, VBAP) & fills the relevant communication structure with the data. The data is stored in cluster tables from where it is read when the initialization is run. It is important that during initialization phase, no one generates or modifies application data, at least until the tables can be set up.

  • If i restrict #Not included in Global Filters what will do exactly

    Hi
    If i restrict #Not included in Global Filters what will do exactly
    Regards
    ramu

    Hi ,
    In the Global filters if you are exulding #, then your every keyfigure will be restricted by that . That mean you will not see any record for the infoobject with # value in it .
    You can also imagine, that if you restrict all the keyfigures in the report by exculding #, it will be same as above .
    Hope the above reply was helpful.
    Thanks & Regards,
    Ashutosh Singh

  • Analyze table

    Dear all,
    What are the advantages if we do
    analyze table <table name> compute statisticsWhen ever i run this it is computing huge CPU utilization and taking long time........
    if we do this as far as i know
    1)it will analyze the table and count number of rows in a table properly.......
    Is there any advantage for INDEX if we do this operation.
    Regards,
    Vamsi

    Hey,
    Actually this command is old. I think it is 9i and below; It is still there for backwards compatibility.
    Since you are computing the statitics, oracle is going over all the records to get the stats. You can do estimate statics instead.
    OR, even better, you can use the new DBMS_Stats Package:
    EXEC DBMS_STATS.GATHER_TABLE_STATS (ownname=>'SCHEMA_NAME', tabname => 'TABLE_NAME', estimate_percent=>dbms_stats.auto_sample_size, degree=>2);
    This uses DBMS stats package, to estimate the statistics via a sample size automatically set through oracle.
    You can also use a similar command to estimate the stats of the whole schema
    EXEC DBMS_STATS.GATHER_SCHEMA_STATS (ownname=> 'SCHEMA_NAME', estimate_percent=>dbms_stats.auto_sample_size, degree=>2);
    From previous experience, creating an index is not enough, you have to gather the stats on the related table, so that the execution plan gets optimized.
    This command get table stats, histogram, uniqueness.. etc

  • Analyze table in oracle 8.1.6

    Hi,
    I am working in oracle 8.1.6 on unix.the optimizer used here is RBO. I need to analyze a table using the command "analyze table <tablename> compute statistics; but my team mate said that the using anlyze table will degrade the performance.
    how can i analyze a table without affecting the performance?...
    give me an example..
    rgds..

    user537350 wrote:
    hi,
    i did defrag table using the command alter table move tablespace then rebuild the indexes and then analyze the table.
    while doing the analyze of table my teammate said it will degrade the performance?..how can i proceed ..First, I wouldn't just blindly assume I have a problem to be fixed just because "my teammate" said that what I did would degrade performance. Did he have a valid theory to back up his assertion? Why not actually measure performance and see if it degraded?
    BTW, I assume you realize that your vesion of oracle is totally unsupported in this millenium .... which means your organization doesn't value the data in the database.
    Edited by: EdStevens on Aug 12, 2009 10:46 AM

  • Analyze Table required on a Global Temp. Table

    Hi,
    This is the background. We have a Windows reporting Oracle Server where we write stored procedures to access data mainly based off a warehouse residing on a unix box. DBLinks have been setup and synonym's created .
    We create Global Temp. Tables to store temp. data used by our report stored procedures. I have one query that accesses 5 remote tables and one local table
    The query was taking hours to run...after some research i found out that when I did an "Analyze Table" on my Global temp. table, the query came back in a few minutes.
    My confusion is that this table being a GTT.. it will always be empty when we run "Analyze Table" on it. What information is oracle? Do we need to run "analyze table" on all our GTT's created for different reports?
    Second question on show query plan
    Also if I do a query plan on this query ORacle dooes not provide a plan on the remote tables. If i change the query by removing the reference to the local table and hardcoing some vlaues, oralce returns a query plan for the query which now only uses the remote tables. Is this correct?

    Hi,
    you can fake the statistics of the temporary table.
    First create a real table (with indexes) that looks like the temporary table. Load the table with representative data.
    Then
    dbms_stats.gather_table_stats(ownname=>'schemauser',tabname=>'TEMPCOPY');
    dbms_stats.create_stat_table(ownname=>'schemauser',stattab=>'TEMPSTATS');
    dbms_stats.export_table_stats(ownname=>'schemauser',tabname=>'TEMPCOPY',stattab=>'TEMPSTATS'); --do that for every index
    dbms_stats.export_index_stats(ownname=>'schemauser',indname=>'INDEXNAME',stattab=>'TEMPSTATS');Now we import the generated statistics:
    dbms_stats.import_table_stats(ownname=>'schemauser',tabname=>'TEMPTABLE',stattab=>'TEMPSTATS');
    dbms_stats.import_index_stats(ownname=>'schemauser',tabname=>'TEMPTABLE',stattab=>'TEMPSTATS'); --for every indexOf course you can create a set of statistics and load them as needed.
    Dim
    dbms_stats.

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

  • Analyze table 10g steps

    Hi,
    DB: 10.2.0.4 RAC ASM
    OS: AIX 5.3L 64-bit
    I want to do analyze tables for all users.Please give me the steps for table and schema level.
    Thanks & Regards,
    Sunand

    CJ,
    dbms_utility.analyze_schema has been deprecated since 9i- you should be using dbms_stats.
    Sunand, by default there will be a gather stats job running on your database picking up any 'stale' statistics, have you disabled it?
    If you want/need to run it manually, dbms_stats.gather_database_stats is what you need. Documentation is here http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41448
    Carl

  • Hi gurus what is table control can explin with example

    hi gurus what is table control can explin with example

    TABLE CONTROL
    These are the screen elements used to display tabular data they can be called
    as screen tables( like STEP LOOP).To use table control we have to create it on the screen using SCREEN PAINTER(SE51) and declare a control variable of TYPE TABLEVIEW using CONTROLS statement in the ABAP program. We have to use LOOP .. ENDLOOP statement in both PBO and PAI with or without AT int_table parameter. IF AT int_table parameter is not used than we have to place a MODULE call between the LOOP...ENDLOOP statement to fill the screen table rows from the ABAP program in PBO and program our own scrolling functions
    using OK_CODE field.
    Having a parallel loop(at screen table rows & int table rows) by using parameter
    AT int_table makes the ABAP code simple.
    A special structure of type CXTAB_CONTROL is used to set/get various
    attributes of table control at runtime like CURRENT_LINE ,TOP_LINE.
    ABAP declaration
    CONTROLS: tab_con TYPE TABLEVIEW USING SCREEN nnnn
    Here tab_con is the same name we used in screen for the table control.
    This ABAP statement will declare a control variable that will be used to access
    the table control , and set it's various attributes like number of fixed columns(tab_con-FIXED_COLS) ,total number of records it will display(tab_con-LINES).It is of type CXTAB_CONTROL and is a deep structure(structure containing structures).
    REFRESH CONTROL tab_con FROM SCREEN nnnn
    This ABAP statement will initialize the table control on the screen nnnn to its initial values.
    PBO processingI
    n PBO we have to use the screen LOOP ...ENDLOOP statement , with or without
    intenal table.
    LOOP WITH CONTROL tab_con.
    MODULE fill_tab_con.
    ENDLOOP.
    Here a module should be called between the loop endloop statement to transfer
    data from th ABAP program to the screen table through a structure.This module
    should use the CURRENT_LINE attribute of the table control variable to get the
    current screen table record index to read the data from the internal table into a work area.
    e.g.
    READ TABLE int_table INDEX tab_con-CURRENT_LINE
    The record read will be placed in the header line of the internal table and will be available to the similarly named screen fields or if these are different it can be written explicitly. e.g.
    screen_field_name = int_table-field_name
    LOOP AT int_table INTO workarea WITH CONTROL tab_con CURSOR i FROM
    n1 TO n2.
    ENDLOOP.
    Here the module call is not required to fill the screen table.The CURSOR parameter is a integer of type I indicating which absolute internal table line
    should be the first to display on the table control .FROM n1 TO n2 can be used
    to restrict the starting line and ending line number of the internal table , they are of type SY-TABIX.
    In both cases before the LOOP statement a module should be called which
    is generally for setting of status ,in which we should fill the LINES attribute
    (tab_con-LINES ) of the control with the total number of internal table records,doing this ensures correct and automatic scrolling.
    The ABAP statement DESCRIBE TABLE int_table LINES lines can be used
    to get the total lines in an int table.
    PAI Processing
    We have to use LOOP ... ENDLOOP in PAI so that data can transfer fro table control to ABAP program. If we want to write changes to the data we should
    call a module between the LOOP ... ENDLOOP. The MODULE call to process user commands (SY-UCOM) should be called after the ENDLOOP statement.
    e.g.
    PROCESS AFTER INPUT
    MODULE mod AT EXIT-COMMAND.
    LOOP AT itab_table or LOOP "depending on whether we are using AT int_table
    MODULE modify_int_table.
    ENDLOOP.
    MODULE user_command.
    In the MODULE call modify_int_table we can use
    MODIFY int_table FROM workarea INDEX tab_con-CURRENT_LINE
    or we can use
    int_table-field_name = screen_field_name.

Maybe you are looking for

  • ECC ehp4 A&D Subcontracting in combination with valuated sales order stock

    Hello Experts, a customer's Equipment (serialized material) is received in a valuated sales order stock (special stock E) and must be delivered to a third party service provider in subcontracting, with relevant spare parts (special stock O). The proc

  • Webcenter 11g Tutorial: Building portlets and wiring them fails at step 6

    I'm running through the WebCenter Tutorial. I've done everything up to this point. I've created the portlet, checked the view.jsp works, and registered it as a WSRP producer in my tutorial application. Step 6 asks me to drag and drop the portlet from

  • Adobe Reader 11.0.2 prints wrong chars

    Sporadically but very often I get prints from various PDF documents that aren't printed correctly. Chars are shifted by one. A is a B, B is a C, etc. This seems to be a classic bug, since there is a quite recognizable pattern to be observed. If I pri

  • How can I combine hundreds of PDF without merging their form fields?

    I have a PDF that has dozens of form fields. I have completed several hundred copies of this form, each with different information entered into these form fields. I would like to combine these PDFs into a single PDF such that the form fields do not m

  • Automated Row Fetch for complex primary keys

    I would like to post a workaround for using automated row fetch on tables with a complex primary key (more than 2 components). APEX has the restriction of just beeing able to handle <= 2 PK components, which is not acceptable to me in quite a lot of