May 7, 2013 at 3:21 am
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
May 7, 2013 at 5:09 am
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
and remember....every day is a school day
May 7, 2013 at 6:46 am
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..
May 8, 2013 at 7:18 am
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.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply