472,372 Members | 1,829 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,372 software developers and data experts.

strange performance

MGB
I have a strange performance question hopefully someone can clarify
for me. I take a production database and make a copy of it, called
test, on the same instance on the same server both running at the same
time. All the same things are running for each database and no one is
using each database but me. From Query Analyzer I run a SQL against
production three times in a row and it takes 1 minute 40 seconds on
the last/best run. I then run the same SQL against the test copy and
run it three times in a row and the last/best time is 12 seconds. Can
anyone explain this behavior? If so, I hope this points to something I
can do to my production database to get the same performance.
Thanks,
MGB
Jul 20 '05 #1
5 1458
MGB wrote:
I have a strange performance question hopefully someone can clarify
for me. I take a production database and make a copy of it, called
test, on the same instance on the same server both running at the same
time. All the same things are running for each database and no one is
using each database but me. From Query Analyzer I run a SQL against
production three times in a row and it takes 1 minute 40 seconds on
the last/best run. I then run the same SQL against the test copy and
run it three times in a row and the last/best time is 12 seconds. Can
anyone explain this behavior? If so, I hope this points to something I
can do to my production database to get the same performance.
Thanks,
MGB


Did you check indexes for the tables in the original db?
Do you have the same indexes in the test db?
I had similar issue not long ago, when i copied a dozen of tables to another
database and quesries ran much faster against them comparing to the original tables in original db.
What i found that the original tables were 'overloaded' with 3/4/5 column indexes, so index file
was around 500Meg. When i dropped all indexes and let QA Wizard redo them, i got good execution times.

Also, it helps someties to stop and re-start the sql service :)

WYGL,
Andrey
Jul 20 '05 #2
MGB
Andrey,
Thanks for the reply. I should have been more clear in my original
post: The "copy' was made by taking a full backup of the production
database and restoring it onto the test database. Correct me if I am
wrong, but I assume the indexes would remain intact in that case. It
would probably be good to mention that this is on SQL Server 2000
running on a Windows 2000 Advanced Server.

Many times I have considered restarting the service but I have read
that the service "learns" how to automatically set setting for
performance. So I have not restarted so it wouldn't have to re-learn.
Is that not the case?

There is one other difference I thought of after my original post: As
part of the restore process I change the recovery model from Full to
Simple in the test database.

Thanks,
MGB

Andrey <le*******@yahoo.com> wrote in message news:<7Q36d.127675$D%.85272@attbi_s51>...
MGB wrote:
I have a strange performance question hopefully someone can clarify
for me. I take a production database and make a copy of it, called
test, on the same instance on the same server both running at the same
time. All the same things are running for each database and no one is
using each database but me. From Query Analyzer I run a SQL against
production three times in a row and it takes 1 minute 40 seconds on
the last/best run. I then run the same SQL against the test copy and
run it three times in a row and the last/best time is 12 seconds. Can
anyone explain this behavior? If so, I hope this points to something I
can do to my production database to get the same performance.
Thanks,
MGB


Did you check indexes for the tables in the original db?
Do you have the same indexes in the test db?
I had similar issue not long ago, when i copied a dozen of tables to another
database and quesries ran much faster against them comparing to the original tables in original db.
What i found that the original tables were 'overloaded' with 3/4/5 column indexes, so index file
was around 500Meg. When i dropped all indexes and let QA Wizard redo them, i got good execution times.

Also, it helps someties to stop and re-start the sql service :)

WYGL,
Andrey

Jul 20 '05 #3
A couple thoughts:

1. Does your benchmark SQL perform updates? If yes, is the original
database using "full" recovery model, and the copy using "simple"?
(The recovery model is inherited from the "model" database.)

2. Are both databases on the same disk(s) and controllers?
Is the original database .mdf file highly fragmented on the disk?
Try to detach the database, defrag the disk, then re-attach, and see
if it makes a difference.

MGB wrote:
I have a strange performance question hopefully someone can clarify
for me. I take a production database and make a copy of it, called
test, on the same instance on the same server both running at the same
time. All the same things are running for each database and no one is
using each database but me. From Query Analyzer I run a SQL against
production three times in a row and it takes 1 minute 40 seconds on
the last/best run. I then run the same SQL against the test copy and
run it three times in a row and the last/best time is 12 seconds. Can
anyone explain this behavior? If so, I hope this points to something I
can do to my production database to get the same performance.
Thanks,
MGB


Jul 20 '05 #4
MGB
Yes. Production (original) is using "full" recovery model, and the
copy is using "simple". Is "simple" faster?

Yes. both databases are on the same disk(s) and controllers. Haven't
checked for fragmentation.

Thanks,
MGB
"L. Bertolini" <be*********@osu.edu> wrote in message news:<cj*********@charm.magnus.acs.ohio-state.edu>...
A couple thoughts:

1. Does your benchmark SQL perform updates? If yes, is the original
database using "full" recovery model, and the copy using "simple"?
(The recovery model is inherited from the "model" database.)

2. Are both databases on the same disk(s) and controllers?
Is the original database .mdf file highly fragmented on the disk?
Try to detach the database, defrag the disk, then re-attach, and see
if it makes a difference.

MGB wrote:
I have a strange performance question hopefully someone can clarify
for me. I take a production database and make a copy of it, called
test, on the same instance on the same server both running at the same
time. All the same things are running for each database and no one is
using each database but me. From Query Analyzer I run a SQL against
production three times in a row and it takes 1 minute 40 seconds on
the last/best run. I then run the same SQL against the test copy and
run it three times in a row and the last/best time is 12 seconds. Can
anyone explain this behavior? If so, I hope this points to something I
can do to my production database to get the same performance.
Thanks,
MGB

Jul 20 '05 #5


MGB wrote:
Yes. Production (original) is using "full" recovery model, and the
copy is using "simple". Is "simple" faster?

Yes, because there is less logging overhead.



Jul 20 '05 #6

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

Similar topics

2
by: jfixsen | last post by:
Hello! Oracle 9.2.0.4 SunOS pchi-db01 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-EnterpriseSystem = SunOS Node = pchi-db01 Release = 5.8 KernelID = Generic_108528-19 Machine = sun4u...
24
by: David | last post by:
hello. when doing the simple following computation, the value put into the variable numMinusOne is NOT the same as what the computation is showed to be in the Watch window!! here is the code:...
3
by: Roland | last post by:
Hi! I am working on a project in which i implement a mathematical optimization algorithm. One of the requirements on the code is very good performance. So i started to optimize a bit. Now i do...
10
by: Mark Barinstein | last post by:
Hello. W2K, db2 v7, fp11. Given: create table pays ( acode integer not null, packno smallint not null, sum decimal(15, 2) not null
9
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using the iSeries Client Access Driver ver...
0
by: z. f. | last post by:
Hi, i have asp.net vb.net wep application. i try to investigate performance issue. so first i built a vb.net windows application that makes http requests to my pages and show me the time taken...
4
by: William Sullivan | last post by:
I have an extremely weird problem that I have no idea how to approach. I have a simple page with a search textbox and a search button. The button causes a postback, where I perform the search and...
1
by: Wang E | last post by:
I've been working on an online judge(for ACM/ICPC) using C#.Programmes submitted by users can now be compiled,and it's the problem to judge.I use the Process class in C#,and my thread is as...
1
by: Nicholas Palmer | last post by:
Hi all, Got a question about the AspCompat=true page property. First a little background. We have an ASP.NET app that uses two COM components. The first is the Microsoft OWC 11 components and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.