Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query being slow

Status
Not open for further replies.

mingus

Programmer
Joined
May 8, 2001
Messages
59
Location
US
Okay I am sure this another stupid thing I am over looking, but after a few hours I don't where to look anymore.

I have the same database on two boxes. Well they should be the same.

One both I issue the command:

SELECT count(non_index_col) FROM BIG_TABLE

The table has 8 million records in it.
Both boxes have the same primary key/index set up, the column I am doing the count on is not indexed (I am not a DBA, I just left with this design).

On box 1 it takes 20 seconds.
On box 2 it takes 3:30 seconds.

Anybody have a clue to why? I did shrink the database (and moved the pages). What else can I do to ensure maximum performace of a database?

thanks for any help (again)

mingus
 
Are the servers the same? Same RAM? Same processor speed? Same number of processors? Same disk configuration? RAID?

Do both servers have the same SQL Server version and Service Pack? Same OS?

Have you utilized Performance monitor to measure CPU Usage and cache hit rate? Is there any other activity on the servers?

What tool are you using to run the query?

There are so many factors. I recommend reading some of the articles on performance at the following sites.


Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top