locked
Complex query ends in 8623-error RRS feed

  • Question

  • Hi

    I do have a quite complex query, which ends in 8623-error.

    My server is SQL Server 2005, SP3, CU10, which means build no. 9.00.4305.

    Any idea?


    -- thanks in advance / danke im voraus, fritz -- Fritz Theiss
    Friday, June 25, 2010 3:16 PM

Answers

  • Hi Deven,

    thanks for following-up on this.

    However we have fixed the problem in the meantime by changing the query --> OPTION(HASH GROUP) was used.

    Regards, Fritz


    -- thanks in advance / danke im voraus, fritz -- Fritz Theiss
    • Marked as answer by Fritz Theiss Friday, July 2, 2010 11:47 AM
    Friday, July 2, 2010 11:47 AM

All replies

  • It might a good idea to explain the error more in detail:

    "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".


    -- thanks in advance / danke im voraus, fritz -- Fritz Theiss
    Friday, June 25, 2010 3:33 PM
  • Hi Fritz,

    This is caused because SQL Server tries to compile query plan for complex queries. Try re-writing your query or look at this post.

    http://support.microsoft.com/kb/818729

    http://itknowledgeexchange.techtarget.com/sql-server/sql-2005-internal-query-error-8623-still-unfixed/


    Regards, Deven ------------------------------------------------------------ Please vote if you find any of my post helpful.
    Friday, June 25, 2010 3:40 PM
  • Hi Deven,

    thanks so far.

    However the first link is related to SQL Server 2000 and therefore not matching to my issue as I do have SQL Server 2005 (as written previously).

    The second link leads to https://connect.microsoft.com/SQLServer/feedback/details/332815/internal-query-processor-error-the-query-processor-could-not-produce-a-query-plan, which talks about an INSERT-clause causing the same error. However I am running a complex SELECT-query. Does this mean that the unfixed bug discussed there is also related to my problem?

    Regards, Fritz


    -- thanks in advance / danke im voraus, fritz -- Fritz Theiss
    Friday, June 25, 2010 4:58 PM
  • Hi Fritz,

    Can you please post your query, table definition to be more precise in answering your question.

    If possible also post sample data as well, count of rows in each table.

    Thanks.


    Regards, Deven ------------------------------------------------------------ Please vote if you find any of my post helpful.
    • Proposed as answer by Kalman Toth Thursday, July 1, 2010 10:14 PM
    Friday, June 25, 2010 8:31 PM
  • Hi Deven,

    thanks for following-up on this.

    However we have fixed the problem in the meantime by changing the query --> OPTION(HASH GROUP) was used.

    Regards, Fritz


    -- thanks in advance / danke im voraus, fritz -- Fritz Theiss
    • Marked as answer by Fritz Theiss Friday, July 2, 2010 11:47 AM
    Friday, July 2, 2010 11:47 AM