All_tables & user_tables view
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: All_tables & user_tables view

  1. #1
    Join Date
    Jul 2001
    Location
    Bangalore
    Posts
    33

    Exclamation

    In the all_tables and user_tables view, there is a column named "num_rows" which gives us the number of rows in that table, but it is not equivalent to count(*) from that respective table. Can you please let me know if this is a bug or is this the expected functionality. If so, what does this signify?


    Thanks,
    Umesh Sharoff

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    That's not a bug, that's a feature :-)

    Column NUM_ROWS updates ANALYZE command. Its value means number of rows that the table had in the moment of analyze process and it's used by the optimizer for computing plans and for that purpose it doesn't need to be exact.

    For exact count of rows in a table you should use count().

    HTH,
    Ales



  3. #3
    Join Date
    Jul 2001
    Location
    Bangalore
    Posts
    33
    Thanks Ales

Posting Permissions

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



Click Here to Expand Forum to Full Width