Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54

    Unanswered: Display number of rows in tables?

    I use this query but num_rows is blank for all tables. I know I have rows in all these tables. Why? Thanks.

    ”select owner, table_name, num_rows from dba_tables where owner like 'MRC%'”

    Results:
    OWNER TABLE_NAME NUM_ROWS
    ------------------------------ ------------------------------ ----------
    MRCAPPLLIB MRCDCT00
    MRCAPPLLIB MRCDCT85
    MRCAPPLLIB MRCDCT86
    MRCAPPLLIB MRCDCT88
    MRCAPPLLIB MRCOBJ01
    MRCAPPLLIB MRCOBJ02
    MRCAPPLLIB MRCOBJ03
    MRCAPPLLIB MRCPRDCT
    MRCAPPLLIB MRCPRFIL
    MRCJAVALIB MRCDCT01
    MRCJAVALIB MRCDCT02

  2. #2
    Join Date
    Jan 2004
    Location
    Scottsdale, AZ
    Posts
    106

    Question

    Statistics haven't been run?
    "Take Control!
    Make The Choice!
    Accept The Consequences!
    Deal With The Results! "

  3. #3
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54
    How to run Statistics ?
    Thanks.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    Originally posted by jin007
    How to run Statistics ?
    Thanks.
    exec dbms_stats.gather_schema_stats('SCHEMA_NAME');

    that's the basic way.
    there are other parameters you can set.
    Look up docs regarding dbms_stats.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Jan 2004
    Location
    Scottsdale, AZ
    Posts
    106
    "Take Control!
    Make The Choice!
    Accept The Consequences!
    Deal With The Results! "

  6. #6
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54
    Thank you all!
    I got it. Interesting oracle!
    I have been on DB2 for 10 years. Now just start playing oracle.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •