TSQL tuning problem

  • Good day

    I have the following query:

    Select

    T2.Line_Of_Business_Code As Line_Of_Business,

    T2.Ledger_Type,

    T2.Period_End_Date,

    T2.Fiscal_Pattern,

    T3.Company_Code as Company,

    T2.Company As BU_Company,

    T2.Object_Account,

    T2.Subsidiary,

    T2.Opening_Balance,

    T2.Closing_Balance,

    T2.Movement,

    T3.Country_Of_Ultimate_Owner_Code As Service_Line

    From

    dbo.vw_Balance_Income T2

    Left Outer Join

    DM_Dim_Business_Unit T3

    on

    T2.Business_Unit = T3.Business_Unit_Code

    WHERE

    T2.Period_End_Date > '2007/12/31' And Cast(T2.Account_Id As int) < 1156895 When I look at the execution plan it refrences a table that do no appear in the query. Is this because of the partition? Maybe someone can tel me why this is happening. I attached the execution plan. Please let me know if more info is needed.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Do not reinvent the wheel.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  • No worries found the problem. Experiencing the monday stupidity.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Do not reinvent the wheel.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Viewing 2 posts - 1 through 1 (of 1 total)

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