473,417 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

SQL Enterprise Manager and Query Analyzer displaying different Row Counts

The row counts I am getting from SQL Enterprise Manager and Query
Analyzer are different. When I double click a table in Enterprise
Manager it gives me a row count of say 1000. However, when I select *
from that same table in Query Analyzer it returns 1028 rows. Anyone
know why or better yet, how to fix it? Thanks!

Jul 23 '05 #1
2 2257
Ray
EM gets it's number from sysindexes and is only an estimate. For accuracy
you must scan the table. Try select count(*) from table
<jc***@aol.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
The row counts I am getting from SQL Enterprise Manager and Query
Analyzer are different. When I double click a table in Enterprise
Manager it gives me a row count of say 1000. However, when I select *
from that same table in Query Analyzer it returns 1028 rows. Anyone
know why or better yet, how to fix it? Thanks!

Jul 23 '05 #2
(jc***@aol.com) writes:
The row counts I am getting from SQL Enterprise Manager and Query
Analyzer are different. When I double click a table in Enterprise
Manager it gives me a row count of say 1000. However, when I select *
from that same table in Query Analyzer it returns 1028 rows. Anyone
know why or better yet, how to fix it? Thanks!


You could do an DBCC UPDATEUSAGE for the table. That would address the
issue for the moment.

But as Ray says, EM gets the data from sysindexes where it is not an
accurate value. Then again, if there are 100 millions of rows in a table,
that is a lot faster way to get an approxamite number.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PF | last post by:
On one of our machines, all of the SQL Server 2000 components except for the main Server component (SQL Server core) itself were installed (Management tools, etc) a while ago and everything was...
1
by: ffoiii | last post by:
I am attempting to connect to a remote default instance of SQL Server 2k on Win2k using Enterprise Manager from my local host but receive a "SQL Server registration failed, timeout expired" error...
1
by: bitunwise | last post by:
I had a problem today where I could not see column names and all tables had a _1 after them when viewing a Sql Server view in Enterprise Manager e.g. TableName Company when added to the view...
2
by: Philip Mette | last post by:
I run a stored procedure manually each day without fail using Query Analyzer.I.E. I right click in the browser window on the stored procedure hit open and execute. I am trying to get my "DBA" to...
1
by: Greg Doherty | last post by:
I am using SQL Server 2000. I have created a new database in Query Analyzer but I cannot see it in Enterprise Manager. I then created a new database in Enterprise Manager, but I can't see it in...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
3
by: Lyle H. Gray | last post by:
Enterprise Manager for MSSQL 2000 (V8.0), connecting to MSSQL 7 database server: Some logins can see the listing of all databases through Enterprise Manager, some cannot. Logins are set up as...
1
by: Alex | last post by:
Hi Everyone, Most of our MS SQL Servers are still running on SQL 2000, but being I will soon be upgrading my workstation to Vista Business I'd like to install MS SQL 2005 Enterprise Manager to...
1
by: chudson007 | last post by:
Hi All, What are the pros and cons between using Enterprise Manager or Query Analyzer for my queries. Currently I use Enterprise Manager because I prefer the interface and only use Query...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.