473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 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 1530
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.