If you want to count the number of rows across all the tables in a database ,select count(*) for all the tables is quite inefficient method.Better approach is as under
SELECT
sysobjects.Name
, sysindexes.Rows
FROM
sysobjects
INNER JOIN sysindexes
ON sysobjects.id = sysindexes.id
WHERE
type = 'U'
AND sysindexes.IndId < 2
ORDER BY
sysobjects.Name
dbbad7d4-853c-434c-b62a-46c44d38385f|1|4.0
Categories:
MySQL, SQL SERVER
26. March 2012
Tags:
Counting Rows MySql