472,784 Members | 981 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 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 2233
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.