Showing posts with label speed. Show all posts
Showing posts with label speed. Show all posts

Monday, March 26, 2012

Moving a database from one machine to another and the lack of speed

Dear All,

We have a procedure that takes12 minutes to run on the first server but
that same procedure now takes 3 hours to run on the second server using the
same data. Does anyone have any suggestions why this is happening and how
to make the procedure faster on the second server

Thanks in advance.

Jeff Magouirk"Jeff Magouirk" <magouirkj@.njc.org> wrote in message
news:113bhrh7krjtjad@.corp.supernews.com...
> Dear All,
> We have a procedure that takes12 minutes to run on the first server but
> that same procedure now takes 3 hours to run on the second server using
> the same data. Does anyone have any suggestions why this is happening and
> how to make the procedure faster on the second server
> Thanks in advance.
> Jeff Magouirk
>

No idea - the usual advice if you see something like that is to a) update
statistics, and b) use Profiler to identify what's taking so much time. You
can also capture the execution plan in Profiler (or use Query Analyzer,
which is a bit more user-friendly), and compare it against the plan on the
original server.

If that doesn't help, you'll need to give more details about your
environment - are they the same MSSQL version? The same hardware? Do you
have the same database schema (including indexes etc.)? Are the database
files exactly the same size? Are they using the same recovery model? Is the
data the same (or nearly so)? Is everything slow, or only certain
procedures? Etc.

Simon

Wednesday, March 21, 2012

Move Temp DB and Logs to get more speed?

We are running a server with IIS and SQL 2K using the following
configuration:
C: OS/Inetpub
D: SQL 2K DB/Logs
E: IIS Logs
F: Not Used
G: Not Used
We have a single SQL 2K DB that all the websites use.
I'm currently constrained to a single server and the drive configuration. I
would like to optimize better by using the new F: and G: drives.
Additionally the C: and D: have no problem keeping up so I could move IIS
logs to the C: drive if needed.
Based on reading I've been doing it sounds like I will get the best
performance from moving the TempDB and the Logs files to different drives
but which configuration would be best:
F: TempDB DB and Logs
G: Our main DB Log Files
or
F: TempDB Logs
G: Our main DB Log Files
or
Something else.
Please suggest my best route.
Thanks!
It's a best practice to have the data and logs on separate partitions. This
is both for safety (High Availability) as well as performance. Also, try to
keep tempdb separate from your app DB's. Thus, you could go with:
D: app data
F: app log
G: tempdb
Try that first. You can also move the tempdb log to F: and see if that
improves or degrades performance. Logs should not be placed on RAID5
partitions.
HTH
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
We are running a server with IIS and SQL 2K using the following
configuration:
C: OS/Inetpub
D: SQL 2K DB/Logs
E: IIS Logs
F: Not Used
G: Not Used
We have a single SQL 2K DB that all the websites use.
I'm currently constrained to a single server and the drive configuration. I
would like to optimize better by using the new F: and G: drives.
Additionally the C: and D: have no problem keeping up so I could move IIS
logs to the C: drive if needed.
Based on reading I've been doing it sounds like I will get the best
performance from moving the TempDB and the Logs files to different drives
but which configuration would be best:
F: TempDB DB and Logs
G: Our main DB Log Files
or
F: TempDB Logs
G: Our main DB Log Files
or
Something else.
Please suggest my best route.
Thanks!
|||Hi Tom, thanks for the advice, just to clarify are you suggesting moving
both TempDB Data and Log to G to start or just the Data?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
> It's a best practice to have the data and logs on separate partitions.
> This
> is both for safety (High Availability) as well as performance. Also, try
> to
> keep tempdb separate from your app DB's. Thus, you could go with:
> D: app data
> F: app log
> G: tempdb
> Try that first. You can also move the tempdb log to F: and see if that
> improves or degrades performance. Logs should not be placed on RAID5
> partitions.
> HTH
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
> We are running a server with IIS and SQL 2K using the following
> configuration:
> C: OS/Inetpub
> D: SQL 2K DB/Logs
> E: IIS Logs
> F: Not Used
> G: Not Used
> We have a single SQL 2K DB that all the websites use.
> I'm currently constrained to a single server and the drive configuration.
> I
> would like to optimize better by using the new F: and G: drives.
> Additionally the C: and D: have no problem keeping up so I could move IIS
> logs to the C: drive if needed.
> Based on reading I've been doing it sounds like I will get the best
> performance from moving the TempDB and the Logs files to different drives
> but which configuration would be best:
> F: TempDB DB and Logs
> G: Our main DB Log Files
> or
> F: TempDB Logs
> G: Our main DB Log Files
> or
> Something else.
> Please suggest my best route.
> Thanks!
>
>
|||Initially, try both data and log for tempdb. If that is satisfactory, you
can leave it. If you still have perf issues, then move the log to another
drive.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
Hi Tom, thanks for the advice, just to clarify are you suggesting moving
both TempDB Data and Log to G to start or just the Data?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
> It's a best practice to have the data and logs on separate partitions.
> This
> is both for safety (High Availability) as well as performance. Also, try
> to
> keep tempdb separate from your app DB's. Thus, you could go with:
> D: app data
> F: app log
> G: tempdb
> Try that first. You can also move the tempdb log to F: and see if that
> improves or degrades performance. Logs should not be placed on RAID5
> partitions.
> HTH
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
> We are running a server with IIS and SQL 2K using the following
> configuration:
> C: OS/Inetpub
> D: SQL 2K DB/Logs
> E: IIS Logs
> F: Not Used
> G: Not Used
> We have a single SQL 2K DB that all the websites use.
> I'm currently constrained to a single server and the drive configuration.
> I
> would like to optimize better by using the new F: and G: drives.
> Additionally the C: and D: have no problem keeping up so I could move IIS
> logs to the C: drive if needed.
> Based on reading I've been doing it sounds like I will get the best
> performance from moving the TempDB and the Logs files to different drives
> but which configuration would be best:
> F: TempDB DB and Logs
> G: Our main DB Log Files
> or
> F: TempDB Logs
> G: Our main DB Log Files
> or
> Something else.
> Please suggest my best route.
> Thanks!
>
>
|||Changes worked great! Thanks for the recomendations.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%234W8TpKhIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Initially, try both data and log for tempdb. If that is satisfactory, you
> can leave it. If you still have perf issues, then move the log to another
> drive.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
> Hi Tom, thanks for the advice, just to clarify are you suggesting moving
> both TempDB Data and Log to G to start or just the Data?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
>
|||Great news. Thanx for the follow-up. :-)
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:uDeCmGTiIHA.1164@.TK2MSFTNGP02.phx.gbl...
Changes worked great! Thanks for the recomendations.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%234W8TpKhIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Initially, try both data and log for tempdb. If that is satisfactory, you
> can leave it. If you still have perf issues, then move the log to another
> drive.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
> Hi Tom, thanks for the advice, just to clarify are you suggesting moving
> both TempDB Data and Log to G to start or just the Data?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
>

Move Temp DB and Logs to get more speed?

We are running a server with IIS and SQL 2K using the following
configuration:
C: OS/Inetpub
D: SQL 2K DB/Logs
E: IIS Logs
F: Not Used
G: Not Used
We have a single SQL 2K DB that all the websites use.
I'm currently constrained to a single server and the drive configuration. I
would like to optimize better by using the new F: and G: drives.
Additionally the C: and D: have no problem keeping up so I could move IIS
logs to the C: drive if needed.
Based on reading I've been doing it sounds like I will get the best
performance from moving the TempDB and the Logs files to different drives
but which configuration would be best:
F: TempDB DB and Logs
G: Our main DB Log Files
or
F: TempDB Logs
G: Our main DB Log Files
or
Something else.
Please suggest my best route.
Thanks!It's a best practice to have the data and logs on separate partitions. This
is both for safety (High Availability) as well as performance. Also, try to
keep tempdb separate from your app DB's. Thus, you could go with:
D: app data
F: app log
G: tempdb
Try that first. You can also move the tempdb log to F: and see if that
improves or degrades performance. Logs should not be placed on RAID5
partitions.
HTH
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
We are running a server with IIS and SQL 2K using the following
configuration:
C: OS/Inetpub
D: SQL 2K DB/Logs
E: IIS Logs
F: Not Used
G: Not Used
We have a single SQL 2K DB that all the websites use.
I'm currently constrained to a single server and the drive configuration. I
would like to optimize better by using the new F: and G: drives.
Additionally the C: and D: have no problem keeping up so I could move IIS
logs to the C: drive if needed.
Based on reading I've been doing it sounds like I will get the best
performance from moving the TempDB and the Logs files to different drives
but which configuration would be best:
F: TempDB DB and Logs
G: Our main DB Log Files
or
F: TempDB Logs
G: Our main DB Log Files
or
Something else.
Please suggest my best route.
Thanks!|||Hi Tom, thanks for the advice, just to clarify are you suggesting moving
both TempDB Data and Log to G to start or just the Data?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
> It's a best practice to have the data and logs on separate partitions.
> This
> is both for safety (High Availability) as well as performance. Also, try
> to
> keep tempdb separate from your app DB's. Thus, you could go with:
> D: app data
> F: app log
> G: tempdb
> Try that first. You can also move the tempdb log to F: and see if that
> improves or degrades performance. Logs should not be placed on RAID5
> partitions.
> HTH
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
> We are running a server with IIS and SQL 2K using the following
> configuration:
> C: OS/Inetpub
> D: SQL 2K DB/Logs
> E: IIS Logs
> F: Not Used
> G: Not Used
> We have a single SQL 2K DB that all the websites use.
> I'm currently constrained to a single server and the drive configuration.
> I
> would like to optimize better by using the new F: and G: drives.
> Additionally the C: and D: have no problem keeping up so I could move IIS
> logs to the C: drive if needed.
> Based on reading I've been doing it sounds like I will get the best
> performance from moving the TempDB and the Logs files to different drives
> but which configuration would be best:
> F: TempDB DB and Logs
> G: Our main DB Log Files
> or
> F: TempDB Logs
> G: Our main DB Log Files
> or
> Something else.
> Please suggest my best route.
> Thanks!
>
>|||Initially, try both data and log for tempdb. If that is satisfactory, you
can leave it. If you still have perf issues, then move the log to another
drive.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
Hi Tom, thanks for the advice, just to clarify are you suggesting moving
both TempDB Data and Log to G to start or just the Data?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
> It's a best practice to have the data and logs on separate partitions.
> This
> is both for safety (High Availability) as well as performance. Also, try
> to
> keep tempdb separate from your app DB's. Thus, you could go with:
> D: app data
> F: app log
> G: tempdb
> Try that first. You can also move the tempdb log to F: and see if that
> improves or degrades performance. Logs should not be placed on RAID5
> partitions.
> HTH
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
> We are running a server with IIS and SQL 2K using the following
> configuration:
> C: OS/Inetpub
> D: SQL 2K DB/Logs
> E: IIS Logs
> F: Not Used
> G: Not Used
> We have a single SQL 2K DB that all the websites use.
> I'm currently constrained to a single server and the drive configuration.
> I
> would like to optimize better by using the new F: and G: drives.
> Additionally the C: and D: have no problem keeping up so I could move IIS
> logs to the C: drive if needed.
> Based on reading I've been doing it sounds like I will get the best
> performance from moving the TempDB and the Logs files to different drives
> but which configuration would be best:
> F: TempDB DB and Logs
> G: Our main DB Log Files
> or
> F: TempDB Logs
> G: Our main DB Log Files
> or
> Something else.
> Please suggest my best route.
> Thanks!
>
>|||Changes worked great! Thanks for the recomendations.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%234W8TpKhIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Initially, try both data and log for tempdb. If that is satisfactory, you
> can leave it. If you still have perf issues, then move the log to another
> drive.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
> Hi Tom, thanks for the advice, just to clarify are you suggesting moving
> both TempDB Data and Log to G to start or just the Data?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
>> It's a best practice to have the data and logs on separate partitions.
>> This
>> is both for safety (High Availability) as well as performance. Also, try
>> to
>> keep tempdb separate from your app DB's. Thus, you could go with:
>> D: app data
>> F: app log
>> G: tempdb
>> Try that first. You can also move the tempdb log to F: and see if that
>> improves or degrades performance. Logs should not be placed on RAID5
>> partitions.
>> HTH
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Bishop" <nospam@.nospam.com> wrote in message
>> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
>> We are running a server with IIS and SQL 2K using the following
>> configuration:
>> C: OS/Inetpub
>> D: SQL 2K DB/Logs
>> E: IIS Logs
>> F: Not Used
>> G: Not Used
>> We have a single SQL 2K DB that all the websites use.
>> I'm currently constrained to a single server and the drive configuration.
>> I
>> would like to optimize better by using the new F: and G: drives.
>> Additionally the C: and D: have no problem keeping up so I could move IIS
>> logs to the C: drive if needed.
>> Based on reading I've been doing it sounds like I will get the best
>> performance from moving the TempDB and the Logs files to different drives
>> but which configuration would be best:
>> F: TempDB DB and Logs
>> G: Our main DB Log Files
>> or
>> F: TempDB Logs
>> G: Our main DB Log Files
>> or
>> Something else.
>> Please suggest my best route.
>> Thanks!
>>
>|||Great news. Thanx for the follow-up. :-)
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bishop" <nospam@.nospam.com> wrote in message
news:uDeCmGTiIHA.1164@.TK2MSFTNGP02.phx.gbl...
Changes worked great! Thanks for the recomendations.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%234W8TpKhIHA.6032@.TK2MSFTNGP03.phx.gbl...
> Initially, try both data and log for tempdb. If that is satisfactory, you
> can leave it. If you still have perf issues, then move the log to another
> drive.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Bishop" <nospam@.nospam.com> wrote in message
> news:OJ8syj7gIHA.5752@.TK2MSFTNGP03.phx.gbl...
> Hi Tom, thanks for the advice, just to clarify are you suggesting moving
> both TempDB Data and Log to G to start or just the Data?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:Ogjz5b7gIHA.5208@.TK2MSFTNGP04.phx.gbl...
>> It's a best practice to have the data and logs on separate partitions.
>> This
>> is both for safety (High Availability) as well as performance. Also, try
>> to
>> keep tempdb separate from your app DB's. Thus, you could go with:
>> D: app data
>> F: app log
>> G: tempdb
>> Try that first. You can also move the tempdb log to F: and see if that
>> improves or degrades performance. Logs should not be placed on RAID5
>> partitions.
>> HTH
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Bishop" <nospam@.nospam.com> wrote in message
>> news:u20v0S7gIHA.4692@.TK2MSFTNGP05.phx.gbl...
>> We are running a server with IIS and SQL 2K using the following
>> configuration:
>> C: OS/Inetpub
>> D: SQL 2K DB/Logs
>> E: IIS Logs
>> F: Not Used
>> G: Not Used
>> We have a single SQL 2K DB that all the websites use.
>> I'm currently constrained to a single server and the drive configuration.
>> I
>> would like to optimize better by using the new F: and G: drives.
>> Additionally the C: and D: have no problem keeping up so I could move IIS
>> logs to the C: drive if needed.
>> Based on reading I've been doing it sounds like I will get the best
>> performance from moving the TempDB and the Logs files to different drives
>> but which configuration would be best:
>> F: TempDB DB and Logs
>> G: Our main DB Log Files
>> or
>> F: TempDB Logs
>> G: Our main DB Log Files
>> or
>> Something else.
>> Please suggest my best route.
>> Thanks!
>>
>