Link to home
Start Free TrialLog in
Avatar of jazzer102
jazzer102

asked on

SQL 2005: The query processor ran out of internal resources and could not produce a query plan.

Hi There,

I have a simple Classic ASP recordset that inserts some data into a simple table (5 cols) (SQL 2005)

The complication in the artitecture is that the table forms part of the strucutre for about 350 indexed views (standard and full text), although only affects one of these views based on teh value of one of the columns in the table.

Im getting this error:

Microsoft SQL Native Client error '80004005'

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 have received this message in error, contact Customer Support Services for more information.

If I insert the same data using a SQL insert statement via SSMS it goes in. I have also had a look at the execution plan for this query and it is quite complex and referrs back to the indexes on one of the views and a linked table via in the view, but is not that complex.

It has been working up until now.

Another random one was that there was disk space issues on this server this morning which have been resolved.

i have a hunch that an SQL restart, or server restart may solve this issue. However cannot afford the downtime right now.

URGENT advice appreciated.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of mcv22
mcv22
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazzer102
jazzer102

ASKER

SQL 2005 version is 9.00.4035.00 - SP3 - Developer Edition

Hotfix sounds like it should apply but they only provide it for RTM and SP1

What do you think?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for this, I have bypassed the issue but using an ADODB Command and insert statment to put the data in. This is better practice anyway.

I am a bit nervous about adding the above hotfixes when they dont directly relate to the issue. And cant afford any downtime at this point.

Also Im becoming increasingly suspicious of MS service packs that "include" previous hotfixes for errors that happen exactly as the hotfix describes, but shouldnt happen as you have as SP that "covers" the issue. This is not the first time this I have come accross this situation within SQL 2005.
This seems like it should be the best fix for the problem, also see my final commnet regarding my workaround.
Further Info:

Tried to resolve by installing latest Cumalative Update and this does NOT resolve the issue.

Cant install the hotfix in the first reply as on SP3 and this is only for SP1