DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Count of Rows in Large Table

  1. #1
    Join Date
    Aug 2000
    Posts
    2

    Question

    How can I count the number of rows in a large table?

    Currently executing from SQL Plus:

    commit;
    set transaction use rollback segment r01huge;
    select count(rowid) from tablea;

    Receive error message:

    ORA-01555: snapshot too old: rollback segment number 3 with name "R03" too small

    RBS r01huge (size 600m) was not set, used R03 (size 20m).

    Last count 224,470,269

    What is the best way to count the number of rows in the table?

  2. #2
    Join Date
    Jan 2001
    Posts
    3,134
    Are you doing inserts or updates when you run the count?
    That could cause the rollback error. You could check you export files if you do a daily export.

    I remember reading in a Couchman book that
    SELECT COUNT(1) is easier on the database the
    SELECT COUNT(*). I can't remember why though, but try it.
    SELECT COUNT(1) FROM TABLE_NAME;

    MH
    I remember when this place was cool.

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