« Creation and using of Sybase DBCCDB database | Home | Measuring the speed of MySQL replication »
Quick calculation of the row count
Warning! It depends on the statistics and could be not accurate!
Sybase
select user_name( obj.uid), obj.name , rowcnt(doampg)
from sysindexes idx, sysobjects obj
where idx.indid < 2 and idx.id = obj.id and obj.type = 'U'
order by 1,2
go
from sysindexes idx, sysobjects obj
where idx.indid < 2 and idx.id = obj.id and obj.type = 'U'
order by 1,2
go
select object_name( idx.id ), rowcnt(doampg)
from sysindexes idx
where idx.indid < 2
and object_name( idx.id ) in ('object1','object2')
go
Oracle
select OWNER, TABLE_NAME, NUM_ROWS
from dba_tables
where TABLE_NAME = upper( '&what_tbl.' );
from dba_tables
where TABLE_NAME = upper( '&what_tbl.' );
select OWNER, TABLE_NAME, NUM_ROWS
from dba_tables
order by 1,2;
Topics: Oracle, Sybase, rowcount | Submitter: checkthis
Comments
You must be logged in to post a comment.