Internal Query Processor Error Stack Space
Contents |
as By Design By Design The product team believes this item works according to its intended design. A more detailed explanation for the resolution of this particular item may have the query processor ran out of stack space during query optimization sql server been provided in the comments section. 29 1 Sign into vote ID 172561
The Query Processor Ran Out Of Stack Space During Query Optimization. Please Simplify The Query
Comments 4 Status Closed Workarounds 0 Type Bug Repros 5 Opened 7/28/2006 6:41:35 AM Duplicates 264460 Access Restriction Public Description
Msg 8621 Level 17 State 1 Line 1
Attempting to execute a DELETE against a row in a table causes the "The query processor ran out of stack space during query optimization" error to be returned. This appears to occur with any table that has a significant number of integrity impositions, and it is irrelevant whether the subordinate tables contain any data. It is also irrelevant whether those integrity links cascade or do not, or set NULL, etc. Deleteing a single row based on its unique primary key consistently returns the error. The same database in SQL Server 2000 does not have this issue. What is doubly frustrating about this is that the database, while old and somewhat crusty around the edges, is fairly simple overall, not leaving much room for model changes without essentially starting to drop internal integrity checks. Since these checks work fine for insertion and updates, and the data itself is made much more consistent by the checks, that option isn't of much value. DETAILS ATTACH A FILE EDIT THIS ITEM Assign To Item can only be reassigned when it is active. Comments (4) | Workarounds (0) | Attachments (0) Sign in to post a comment. Please enter a comment. Submit Posted by Tubasi on 7/12/2011 at 10:45 AM I'm sure this is a BUG and Microsoft Developers should come over it. I hope they can fix it Posted by Jason Thorn on 2/20/2008 at 1:37 PM I don't understand why is this issue closed (by design), ... there are reports of this NOT being a problem under SQL 2000. Is someone trying to tell me that there are now more restrictive rules in SQL 2005 regarding foreign keys than there used to be in SQL 2000? That would make upgrading kinda difficult.Thats exactly the situation I'm in. I have a database that
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 7,2000 » T-SQL » Internal Query Processor Error: The query... 15 posts,Page 1 of 212»» Internal Query Processor Error: The query processor ran out of stack space during query optimization. Rate Topic Display Mode Topic Options Author Message ibrahim yousef abu diabibrahim yousef abu diab Posted Tuesday, December 21, 2004 6:57 AM Forum Newbie Group: General Forum Members Last Login: Wednesday, June 1, 2005 6:01 AM Points: 7, Visits: 1 https://connect.microsoft.com/SQLServer/feedback/details/172561/the-query-processor-ran-out-of-stack-space-during-query-optimization-during-simple-delete Server: Msg 8621, Level 17, State 1, Line 1Internal Query Processor Error: The query processor ran out of stack space during query optimization.I got the above error when I tried to delete row from a specific table(delete from test.settings where id = 10054; ), that table has too many foreign keys (1009 FK's), so I thought the Keys is related http://www.sqlservercentral.com/Forums/Topic151966-8-1.aspx to this error and I delete the Primary key on the Primarytable which means cascade the whole FK keys on the dependent tables, after that I issued the delete statement again and worked fine.My question what's the best solution or workaroundtoallow the deletion process without getting this error???May can I use Triggers??Help me?!! Post #151966 Frank KalisFrank Kalis Posted Tuesday, December 21, 2004 7:33 AM SSCertifiable Group: General Forum Members Last Login: Friday, January 8, 2016 1:54 AM Points: 5,957, Visits: 289 See, if this helps:http://support.microsoft.com/kb/q288095/May I add, that I never have heard of a table with that much FK's. Ever thought of doing a bit of normalization on your schema? --Frank KalisMicrosoft SQL Server MVP Webmaster: http://www.insidesql.org/blogsMy blog: http://www.insidesql.org/blogs/frankkalis/ Post #151981 ibrahim yousef abu diabibrahim yousef abu diab Posted Tuesday, December 21, 2004 7:43 AM Forum Newbie Group: General Forum Members Last Login: Wednesday, June 1, 2005 6:01 AM Points: 7, Visits: 1 Thank you Frank , Unfortunately this is not helpful.BTW what kind of normalization that you are talking about it?? can you explain please?? Post #151986 Frank KalisFrank Kalis Posted Tuesday, December 21, 2004 7:55 AM SSCertifiable Group: General Forum Members Last Login: Friday, January 8,
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more http://stackoverflow.com/questions/7804201/sql-server-query-processor-ran-out-of-internal-resources about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21690 Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up sql server query processor ran out of internal resources up vote query processor 3 down vote favorite Query: update mytable set mycol = null where id in ( 583048, 583049, ... (50000 more) ) Message: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you the query processor have received this message in error, contact Customer Support Services for more information. My query is very simple, how should i write it so it works ok ? sql-server tsql share|improve this question edited Oct 18 '11 at 8:36 Martin Smith 262k34415488 asked Oct 18 '11 at 8:08 Softlion 5,73652645 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted Insert the list of values into a #temp table then use in on that. As explained in this answer a large number of IN values can cause it to run out of stack as they get expanded to OR See also related connect item share|improve this answer edited Oct 18 '11 at 8:14 answered Oct 18 '11 at 8:09 Martin Smith 262k34415488 Well you can not insert values into a #temp table, it fails with the same error. –Softlion Oct 20 '11 at 9:01 SQL Server Management Studio crashed when the syntax analysis scans the text (too much lines ?). So i used visual studio, cut the list in 10 groups of 10k lines each, and run the query 10 times ... –Softlion Oct 20 '11 at 9:02 @Softion - What fails? The inser
SQL Server experts to answer whatever question you can come up with. Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums. SQL Server Forums Profile | ActiveTopics | Members | Search | ForumFAQ Register Now and get your question answered! Username: Password: Save Password Forgot your Password? All Forums SQL Server 2000 Forums SQL Server Development (2000) Internal Query Processor Error: HELP Reply to Topic Printer Friendly Author Topic sherrer Yak Posting Veteran 64 Posts Posted-11/18/2002: 13:42:55 I am attempting insert a fairly large amount of data, and I am getting the following error: Server: Msg 8621, Level 17, State 1, Line 1Internal Query Processor Error: The query processor ran out of stack space during query optimization.I have data being processed in VB and in an attempt to get the data to the server all at once, instead inserting it row by row, I am using the following SQL statement...Insert Into T1 (C1, C2, C3, ...)Select V1, V2, V3 ... UNION ALLSelect V1, V2, V3 ... UNION ALL...Is there a way to adjust the stack space on the server?Is there a better way to accomplish my task?I have done similar things in the past, with even more data and not had a problem.Thanks robvolk Most Valuable Yak USA 15732 Posts Posted-11/18/2002: 13:48:12 Are you selecting data from one table and inserting it into another? Or are you passing user-inputted data from a VB application? What kind of data is being passed exactly? Need more detail. sherrer Yak Posting Veteran 64 Posts Posted-11/18/2002: 14:00:14 The application is a billing software. The billing is done in batches of say 500 accounts to 2000 accounts. Each account may produce 1 to 5 transactions that need to be stored into a history table. So I may need to insert as many as 10,000 rows in one operation. Currently the application uses an ADO disconnected recordsets and commits after each account is processed. Speed is my only objective right now, and after tying many ways of getting data from VB, this seems to be the fastest way to do it. tkizer Almighty SQL Goddess USA 38200 Posts Posted-11/18/2002: 14:03:53 Which version of SQL Server are you running? Do you have the latest service pack installed? I took a look at the Knowledge Base and although I didn't see an exact article that relates to your problem, it appears that similar problems have been corrected by installing the latest service pack. V