• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

analyze table ...

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFter running the command
analyze table t1 compute statistics
analyze table t1 validate structure
where can I see the result ?
What is the difference between them ?
Thanks
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The results of these actions are stored in the catalog views.
For the tables you can see them in dba_tables.
there are multiple columns which get updated as a result of this operation. For a detailed explanation, I would suggest Oracle documentation.
In brief:
- analyze table updates the following information.
NUM_ROWS , BLOCKS , EMPTY_BLOCKS , AVG_SPACE , CHAIN_CNT , AVG_ROW_LEN , AVG_SPACE_FREELIST_BLOCKS , NUM_FREELIST_BLOCKS , SAMPLE_SIZE , LAST_ANALYZED

As for validate structure is concerned, it is for partitioned tables.
here's the guff from oracle documentation for this:
When issuing a VALIDATE STRUCTURE against a partitioned table, Oracle verifies that the row belongs to the correct partition. If the row does not collate correctly, the rowid for this row is inserted into a table called "INVALID_ROWS." You can explicitly tell Oracle where to store this list by issuing something like the following: o ANALYZE TABLE <schemaname>.<tablename> VALIDATE STRUCTURE INTO <schemaname>.INVALID_ROWS; If you do not explicitly specify where to store the rowid's of rows that did not collate to the proper partition, Oracle assumes the list is in your own schema. Oracle also assumes that this table is, in fact, named "INVALID_ROWS". Furthermore, there is a possibility that you (or someone else) could have created an identical table or a copy of this table with a different name. In this event, you would have to explicitly use the INTO clause of the ANALYZE command to specify where to store the rowids. The structure of the INVALID_ROWS table has changed between Oracle8 and Oracle8i to accommodate sub-partitions (an enhancement to partitioned tables in Oracle8i).
If u need more info, let me know.
reply
    Bookmark Topic Watch Topic
  • New Topic