03 December 2007

Cardinality

Need to know how many rows are in your tables?


  • T-SQL - The Transact-SQL statement uses sysindexes

  • PL/SQL - The PL/SQL block requires a schema name and does an actual count against the table. If you have current statistics (or permissions to update them), you can just do 'select table_name, num_rows from all_tables'

No comments: