Solved

How to locate number of rows without firing select count(*) query

Posted on 2012-03-20
2
232 Views
Last Modified: 2012-03-20
Hi,
I have 4-5 massive BI tables where the records are in hundreds of millions. I can't fire select count(*) as that will take next 4-5 hours to return results from these tables. The server is already overused.

I can see the query is estimating the execution plan & rows. Is there is an internal optimizer table from where I can get apprx number of rows at each table?


Thanks
0
Comment
Question by:crazywolf2010
2 Comments
 
LVL 25

Expert Comment

by:jogos
ID: 37742085
In the DMV sys.dm_db_index_physical_stats and there the record_count, but read comment on this at
http://msdn.microsoft.com/en-us/library/ms188917.aspx
0
 
LVL 10

Accepted Solution

by:
sqlservr earned 500 total points
ID: 37742132
sp_spaceused 'tabelname'
resutls gives, rows, reserves space, data space, index space
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question