November Happy Hour will be moved to Thursday December 5th.

Deleting waste basket piece by piece

Vote:
 

After a big clean up we now have 78000 pages in our waste basket. I wan't to delete these pages and have tried the stored procedure [sp_DeleteOldPages] but after 39 minutes I get a deadlock.

I would like to delete the pages piece by piece to make the queries quicker. It feels like the [sp_DeleteOldPages] procedure can take very very long time.

Any ideas?

#34354
Nov 04, 2009 7:40
Vote:
 

Now I tried to delete one page with stored procedure editdeletePage with the following code, but all I get is returnvalue=0. the page is not deleted. Why isn't it deleted?

USE [EPiDb]
GO

DECLARE @return_value int

EXEC @return_value = [dbo].[editDeletePage]
  @PageID = 320124,
  @ForceDelete = 1

SELECT 'Return Value' = @return_value

#34355
Nov 04, 2009 8:46
Vote:
 
#34356
Nov 04, 2009 8:46
Vote:
 

Why not use the empty recycle bin scheduled service for this? You could also take a peak at the code with reflector to see what it does.

#34372
Nov 04, 2009 16:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.