New SQL Guy need help

  • This is ODBC Outer Join Escape Sequence http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcouter_join_escape_sequence.asp

    change your code like below and try if it works:

    "...FROM

        myDatabase.dbo.tblBudgetPlanningXVYReportType XVYReportType INNER JOIN Mydatabase.dbo.tblBudgetPlanningXVYReportOutput XVY ON

            XVYReportType.xvyrtID = XVY.xvyroRTID WHERE..."

    Best Regards,

    Vlad

  • Removing the odbc outer join escape sequence worked, but didnt improve query performance. I guess i need to find a way to optimize this query or reduce the number of times SQL Server recreates the execution plan.

  • If you want some tips how to optimize your query, you should post result of this script here.

    set showplan_text on

    go

    SELECT ... (your select)

    go

    set showplan_text off

    go

    OR You can do it yourself. The main point - you should play with indexes.

    All Index Scan in result of showplan_text should be replaced with Index Seek

    Best Regards,

    Vlad

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply