Groups | Blog | Home
all groups > sql server (microsoft) > june 2005 >

sql server (microsoft) : Strange stored procedure results


bruce.parrott NO[at]SPAM infinity.co.nz
6/6/2005 9:38:58 PM
I have a customer website that I host. The site uses a MSSQL 7 database
(Win2K) that has a particular stored procedure which exhibits the
following behaviour:

1. Running the stored procedure in SQL Query analyzer takes ~1.5
minutes
to return 890 rows.
2. When we backup and restore the database to a new blank database, and
rerun the query, it takes 15 seconds to return the same rows.
3. When we do a DTS transfer of the database to a new blank database
and
run the query, it again takes ~1.5 minutes.

We have tried running a maintenance job on the live copy (doing
everything except backing up the database through this plan), and this
does not help.

What could the backup be doing that cleans up the performance so
remarkably?

We have only just discovered this backup trick so I am unsure whether
it will stay fast if we restore a backup over the live DB. I suspect
somehow it will "leak" and performance will again degrade.

Any help much appreciated
aaron.kempf NO[at]SPAM gmail.com
6/14/2005 12:06:55 PM
you need to give about 10 times more detail for us to help you
AddThis Social Bookmark Button