Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error message during deletion Expand / Collapse
Author
Message
Posted Tuesday, May 07, 2013 3:21 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, January 30, 2014 1:19 PM
Points: 48, Visits: 212
Hi All,

I am trying to delete a record from a table using a stored procedure.While executing the SP i am getting the below error.

"The query processor ran out of stack space during query optimization. Please simplify the query."

What could be the reason?

Please help
Post #1450037
Posted Tuesday, May 07, 2013 5:09 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 9:36 AM
Points: 1,636, Visits: 16,530
kk.86manu (5/7/2013)
Hi All,

I am trying to delete a record from a table using a stored procedure.While executing the SP i am getting the below error.

"The query processor ran out of stack space during query optimization. Please simplify the query."

What could be the reason?

Please help


please post details of your proc
ddl for the table you are deleting from, including indexes and FKs
number of rows in table


__________________________________________________________________
you can lead a user to data....but you cannot make them think !
__________________________________________________________________
Post #1450063
Posted Tuesday, May 07, 2013 6:46 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: 2 days ago @ 9:42 AM
Points: 743, Visits: 1,066
What version of SQL Server you are in?
It is a known issue SQL Server 2005 SP2. There is a ptch out to fix this issue.
But if you are in some other version. you have to look back at the code to see what you can optimize. Because What I believe that you have a very -2 complex and big stored proc which is trying to delete something.

Divide your sql's into small statements, use temp tables to store intermediate data etc..
Post #1450102
Posted Wednesday, May 08, 2013 7:18 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, January 30, 2014 1:19 PM
Points: 48, Visits: 212
Hi Livingston,

The procedure is a simple delete statement on a table based on ID column and the total number of rows is 25.

Table in which i am trying to delete is referenced by foreign key(6 foreign key references).

Please let me know if this is causing the issue.If that is the case how to overcome.

Kindly let know your views.
Post #1450547
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse