Showing posts with label dual. Show all posts
Showing posts with label dual. Show all posts

Friday, March 23, 2012

Performance decrease on new server

This one is really bugging me and I'd really appreciate some pointers.
Had a db that worked fine on a dual PII-400 server with 2 gb RAM running NT
4 Server SP6 with SQL Server 7.0.
Bought a dual xeon 2.4 Ghz, with 2 gb RAM and installed Windows 2000 Server
SP4. Then installed SQL Server 7.0 and then applied SP4.
There's plenty of disk space, ie, over 40 Gb free and the database's mdf
file is 2 gb and its ldf file 271 Mb.
I moved the db using detach / attach and ran sp_updatestats to the db
afterwards.
Performance is generally OK (though the db is hardly being pushed) except
for when I try to execute a complicated query. On the old box, this query
would take up 85 - 95% of cpu for around 30 seconds. On the new box, the
same query takes up 100% cpu and goes on for minutes. I haven't actually
timed it, but it takes an unacceptable time.
I could rewrite the query - split it into two or something - but surely this
should be unnecessary on a more powerful box.
I'm fairly newby to sql server admin so may have missed something obvious.
The query is usually executed via odbc from an Access 2000 application, but
I've run it locally on the server to remove Access from the equation.
I've run the Profiler but to be honest it tells me little. Just shows the
sql transact statement starting but not finishing (I end up cancelling the
query before it completes because the system is live).This is a multi-part message in MIME format.
--=_NextPart_000_0D08_01C393E8.DA49A0E0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Using sp_updatestats isn't enough. You want to run a FULLSCAN on each =table:
sp_MSforeachtable 'update statistics ? with fullscan'
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Paul Welsh" <reply.to.group.please@.microsoft.com> wrote in message =news:#WTPEhAlDHA.644@.TK2MSFTNGP11.phx.gbl...
This one is really bugging me and I'd really appreciate some pointers.
Had a db that worked fine on a dual PII-400 server with 2 gb RAM running =NT
4 Server SP6 with SQL Server 7.0.
Bought a dual xeon 2.4 Ghz, with 2 gb RAM and installed Windows 2000 =Server
SP4. Then installed SQL Server 7.0 and then applied SP4.
There's plenty of disk space, ie, over 40 Gb free and the database's mdf
file is 2 gb and its ldf file 271 Mb.
I moved the db using detach / attach and ran sp_updatestats to the db
afterwards.
Performance is generally OK (though the db is hardly being pushed) =except
for when I try to execute a complicated query. On the old box, this =query
would take up 85 - 95% of cpu for around 30 seconds. On the new box, =the
same query takes up 100% cpu and goes on for minutes. I haven't =actually
timed it, but it takes an unacceptable time.
I could rewrite the query - split it into two or something - but surely =this
should be unnecessary on a more powerful box.
I'm fairly newby to sql server admin so may have missed something =obvious.
The query is usually executed via odbc from an Access 2000 application, =but
I've run it locally on the server to remove Access from the equation.
I've run the Profiler but to be honest it tells me little. Just shows =the
sql transact statement starting but not finishing (I end up cancelling =the
query before it completes because the system is live).
--=_NextPart_000_0D08_01C393E8.DA49A0E0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Using sp_updatestats isn't =enough. You want to run a FULLSCAN on each table:
sp_MSforeachtable 'update =statistics ? with fullscan'
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Paul Welsh" wrote in message news:#WTPEhAlDHA.644@.T=K2MSFTNGP11.phx.gbl...This one is really bugging me and I'd really appreciate some =pointers.Had a db that worked fine on a dual PII-400 server with 2 gb RAM running =NT4 Server SP6 with SQL Server 7.0.Bought a dual xeon 2.4 Ghz, with =2 gb RAM and installed Windows 2000 ServerSP4. Then installed SQL =Server 7.0 and then applied SP4.There's plenty of disk space, ie, over 40 =Gb free and the database's mdffile is 2 gb and its ldf file 271 Mb.I =moved the db using detach / attach and ran sp_updatestats to the dbafterwards.Performance is generally OK (though the db is =hardly being pushed) exceptfor when I try to execute a complicated =query. On the old box, this querywould take up 85 - 95% of cpu for around 30 seconds. On the new box, thesame query takes up 100% cpu and =goes on for minutes. I haven't actuallytimed it, but it takes an =unacceptable time.I could rewrite the query - split it into two or something =- but surely thisshould be unnecessary on a more powerful box.I'm =fairly newby to sql server admin so may have missed something =obvious.The query is usually executed via odbc from an Access 2000 application, =butI've run it locally on the server to remove Access from the equation.I've =run the Profiler but to be honest it tells me little. Just shows =thesql transact statement starting but not finishing (I end up cancelling =thequery before it completes because the system is =live).

--=_NextPart_000_0D08_01C393E8.DA49A0E0--|||This is a multi-part message in MIME format.
--=_NextPart_000_0035_01C39495.993D8690
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Thanks for that, Tom. Just tried it. No joy.
I ran the offending query overnight and it took 50 minutes. Previously =it took 30 seconds.
Clearly, there's something fundamental that I've not done.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:elXzkpAlDHA.1764@.tk2msftngp13.phx.gbl...
Using sp_updatestats isn't enough. You want to run a FULLSCAN on each =table:
sp_MSforeachtable 'update statistics ? with fullscan'
--=_NextPart_000_0035_01C39495.993D8690
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Thanks for that, Tom. Just tried =it. No joy.
I ran the offending query overnight and =it took 50 minutes. Previously it took 30 seconds.
Clearly, there's something fundamental =that I've not done.
"Tom Moreau" = wrote in message news:elXzkpAlDHA.1764=@.tk2msftngp13.phx.gbl...
Using sp_updatestats isn't =enough. You want to run a FULLSCAN on each table:

sp_MSforeachtable 'update =statistics ? with fullscan'

--=_NextPart_000_0035_01C39495.993D8690--|||This is a multi-part message in MIME format.
--=_NextPart_000_00C0_01C3948D.9B62D130
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
OK, re-reading it, I see that the OS and hardware have changed but not =SQL Server. I'd be interested in the query plan it generates, as well =as the statistics IO. Also, there may be a disk issue here. Have you =looked at avg disk queue length? What is your disk configuration?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Paul Welsh" <reply.to.group.please@.microsoft.com> wrote in message =news:Owo##xIlDHA.392@.TK2MSFTNGP11.phx.gbl...
Thanks for that, Tom. Just tried it. No joy.
I ran the offending query overnight and it took 50 minutes. Previously =it took 30 seconds.
Clearly, there's something fundamental that I've not done.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:elXzkpAlDHA.1764@.tk2msftngp13.phx.gbl...
Using sp_updatestats isn't enough. You want to run a FULLSCAN on each =table:
sp_MSforeachtable 'update statistics ? with fullscan'
--=_NextPart_000_00C0_01C3948D.9B62D130
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

OK, re-reading it, I see that the OS =and hardware have changed but not SQL Server. I'd be interested in the query =plan it generates, as well as the statistics IO. Also, there may be a disk =issue here. Have you looked at avg disk queue length? What is your =disk configuration?
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Paul Welsh" wrote in message news:Owo##xIlDHA.392@.T=K2MSFTNGP11.phx.gbl...
Thanks for that, Tom. Just tried =it. No joy.
I ran the offending query overnight and =it took 50 minutes. Previously it took 30 seconds.
Clearly, there's something fundamental =that I've not done.
"Tom Moreau" = wrote in message news:elXzkpAlDHA.1764=@.tk2msftngp13.phx.gbl...
Using sp_updatestats isn't =enough. You want to run a FULLSCAN on each table:

sp_MSforeachtable 'update =statistics ? with fullscan'

--=_NextPart_000_00C0_01C3948D.9B62D130--

Wednesday, March 7, 2012

Performance

I have a SQL server 7.0 which is installed on a dual
processors machine (NT4.0), when I try to do a query its
fairly slow, I have checked CPU utilization and memory
they are ok, is there anyway to find out what is wrong
here?
Also is there any tool I can check SQL server performance?
thanks in advance-RobCheck the query plan, also use profiler to see
the statistics of the query, such as reads, writes, etc.
>--Original Message--
>I have a SQL server 7.0 which is installed on a dual
>processors machine (NT4.0), when I try to do a query its
>fairly slow, I have checked CPU utilization and memory
>they are ok, is there anyway to find out what is wrong
>here?
>Also is there any tool I can check SQL server performance?
>thanks in advance-Rob
>.
>|||I am new this area, what is the query plan and how can I
use the profiler.
Thanks-rob
>--Original Message--
>Check the query plan, also use profiler to see
>the statistics of the query, such as reads, writes, etc.
>>--Original Message--
>>I have a SQL server 7.0 which is installed on a dual
>>processors machine (NT4.0), when I try to do a query its
>>fairly slow, I have checked CPU utilization and memory
>>they are ok, is there anyway to find out what is wrong
>>here?
>>Also is there any tool I can check SQL server
performance?
>>thanks in advance-Rob
>>.
>.
>|||Lookup Graphical Query Plan in Books on Line. Too hard to explain in a
newsgroup post.
The query plan will show you problems like Table Scans that can be solved
with more selective where clauses and/or applying indexes to table in
question.
There is obviously much more to it than that, but there is a start for you.
Also, visit www.sql-server-performance.com
Cheers,
Greg Jackson
Portland, OR|||Hi Rob,
You may also want to refer to these articles that may help you troubleshoot performance issues.
224587 HOW TO: Troubleshoot Application Performance with SQL Server
http://support.microsoft.com/?id=224587
This step-by-step article describes how to troubleshoot SQL Server performance issues. Troubleshooting
performance issues involves the use of a series of steps to isolate and determine the cause of an application
slowdown.
~~~
243589 HOW TO: Troubleshoot Slow-Running Queries on SQL Server 7.0 or Later
http://support.microsoft.com/?id=243589
This article describes how to handle a performance issue that applications may experience in conjunction with
Microsoft SQL Server: slow performance of a specific query or group of queries.
~~~
243588 HOW TO: Troubleshoot the Performance of Ad-Hoc Queries
http://support.microsoft.com/?id=243588
This article describes how to troubleshoot the slow performance of many concurrent ad-hoc queries.
~~~
224453 INF: Understanding and Resolving SQL Server 7.0 or 2000 Blocking Problems
http://support.microsoft.com/?id=224453
This article focuses on how to monitor SQL Server to capture pertinent system information and how to analyze
that information to successfully resolve blocking issues.
~~~
Sincerely,
William Wang
Microsoft Partner Online Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> From: "Jaxon" <GregoryAJackson@.hotmail.com>
> References: <045401c3a960$5eccf1f0$a301280a@.phx.gbl> <037501c3a964$e45d7660$a401280a@.phx.gbl>
<05b301c3a966$30440bb0$a101280a@.phx.gbl>
> Subject: Re: Performance
> Date: Wed, 12 Nov 2003 16:31:22 -0800
> Lines: 19
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> Message-ID: <OKLL41XqDHA.2964@.tk2msftngp13.phx.gbl>
> Newsgroups: microsoft.public.sqlserver.server
> NNTP-Posting-Host: 66.203.99.51
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:316205
> X-Tomcat-NG: microsoft.public.sqlserver.server
> Lookup Graphical Query Plan in Books on Line. Too hard to explain in a
> newsgroup post.
> The query plan will show you problems like Table Scans that can be solved
> with more selective where clauses and/or applying indexes to table in
> question.
> There is obviously much more to it than that, but there is a start for you.
> Also, visit www.sql-server-performance.com
>
> Cheers,
>
> Greg Jackson
> Portland, OR
>
>