Optimización de fila de consulta previa de SQL

Aquí está la estructura de mi mesa

MyTable
-----------

ObjectID int (Identity),           -- Primary Key
FileName varchar(10),
CreatedDate datetime
...........
...........
...........

Necesito obtener el tiempo necesario para crear un registro en un archivo ... es decir ... Tiempo transcurrido entre el registro anterior en el mismo archivo y el registro actual del mismo archivo

es decir ... si los registros son

ObjectID    FileName    CreatedDate (just showing the time part here)
--------    --------    -----------
1           ABC         10:23
2           ABC         10:25
3           DEF         10:26
4           ABC         10:30
5           DEF         10:31
6           DEF         10:35

La salida requerida es ...

ObjectID    FileName    CreatedDate     PrevRowCreatedDate
--------    --------    ----------- ---------------
1           ABC         10:23           NULL
2           ABC         10:25           10:23
3           DEF         10:26           NULL
4           ABC         10:30           10:25
5           DEF         10:31           10:26
6           DEF         10:35           10:31

Hasta ahora recibí esta consulta, pero está tardando mucho más de lo esperado ... ¿Hay una mejor manera de hacerlo ...

    Select  A.ObjectID, 
        A.FileName
        A.CreatedDate as CreatedDate, 
        B.PrevRowCreatedDate,
        datediff("SS", '1900-01-01 00:00:00', Coalesce((A.CreatedDate - B.PrevRowCreatedDate),0)) as secondsTaken
    from MyTable as A 
        Cross Apply (       
        (Select PrevRowCreatedDate = Max(CreatedDate) from MyTable as BB 
                        where   BB.FileName = A.FileName and 
                                BB.CreatedDate < A.CreatedDate
        )
        ) as B  

Por favor avíseme si necesita más información

Gracias

Respuestas a la pregunta(2)

Su respuesta a la pregunta