Forum Replies Created

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

  • RE: Function is slow when ...

    Thank you for ur patient

    here it is

    StmtText                      

    ------------------------------

    SET STATISTICS PROFILE ON

    (1 row(s) affected)

    StmtText                                                                                                                                                                                                                                                        

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    DECLARE @dStart AS DATETIME

    DECLARE @dEnd AS DATETIME

    DECLARE @nEAF AS INTEGER

    SET @dStart = '03/03/2003 07:00 AM'

    SET...

  • RE: Function is slow when ...

    I think Mr.Shawn has not seen my Code?  This is my hardcoded query

    SELECT COUNT(HeatNumber) AS HeatsCount,

    Sum(dbo.fnMS_PR_GetTorchWeightForHeat(HeatNumber))  AS Tons

    FROM HeatTable 

    WHERE TapTime BETWEEN DATEADD(hh, -2, '03/03/2003 07:00 AM') AND

       ...

  • RE: Function is slow when ...

    It takes more time. Let me see the query plan.This is my code inside that function

    SELECT COUNT(HeatNumber) AS HeatsCount,

    Sum(dbo.fnMS_PR_GetTorchWeightForHeat(HeatNumber))  AS Tons

    FROM HeatTable 

    WHERE TapTime BETWEEN DATEADD(hh, -2, @dStart) AND...

  • RE: Function is slow when ...

    Am i right?

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