Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of records
Message
From
03/05/2011 12:48:10
 
 
To
03/05/2011 12:41:49
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01509194
Message ID:
01509248
Views:
29
>for the reccount in all tables of a database, I use that view:
>
>
>CREATE VIEW [dbo].[v_reccount]  AS 
>SELECT        o.name                 AS NomTable ,
>              ddps.row_count         AS Reccount
>       FROM   sys.indexes            AS i
>              INNER JOIN sys.objects AS o
>              ON     i.object_id = o.object_id
>              INNER JOIN sys.dm_db_partition_stats AS ddps
>              ON     i.object_id = ddps.object_id
>                 AND i.index_id  = ddps.index_id
>       WHERE (
>                     i.index_id < 2
>              )
>          AND (
>                     o.is_ms_shipped = 0
>              )
>
>
>
>It relies on statistics, so you need to set the stats auto

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform