Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 6th, 2005, 02:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default SP takes long time but reboot fixes it

I have a stored procedure that normally takes 1-2 seconds to run. It is just a Select, no action.

However, after a couple of days, it then takes 7-8 minutes to run.

The tables are not being heavily modified.

If I stop the SQL server and its service then start it again and run the same stored procedure, it runs again in under 2 seconds.

I am doing a nightly "Reorginize data and index pages" with the option checked for "Change free space per page percentage to" set to 10%.

Any thoughts?

Mitch
__________________
Mitch
 
Old December 15th, 2005, 01:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just did a sp_recompile on it and that did not work either.

Mitch
 
Old January 6th, 2006, 06:02 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Anantsharma Send a message via Yahoo to Anantsharma
Default

Use CHECKPOINT Regularly and use DBCC FREEPROCCACHE. Its an issue related to Procedure Cache, You need to keep it clean may be with a frequent SQL JOB. please refer other DBCC commands and SPs for buffers and Cache.

Hope this works perfectly.

B. Anant





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Optimization - Query takes a long time jlrolin SQL Language 2 March 20th, 2007 08:01 AM
ISS Problem: Takes a long t ime to refresh/Connect rtr1900 Classic ASP Components 0 February 27th, 2006 05:58 AM
SP executing time on progressBar control filipczako ADO.NET 0 November 29th, 2005 06:48 PM
Sub Report Takes long Time ketanpatel Crystal Reports 0 December 3rd, 2004 04:11 AM
web reports that take a long time dshoaf Crystal Reports 0 May 12th, 2004 10:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.