Select query does not complete when using offset-fetching : I have implemented pagination in a web application using Linq, the query generated by Linq looks similar to this one:

    SELECT 
        [Extent1].[ID_PLAZO] AS [ID_PLAZO], 
        LTRIM(RTRIM([Extent1].[ID_EXPEDIENTE])) AS [ID_EXPEDIENTE], 
        [Extent1].[ID_TIPO_PLAZO] AS [ID_TIPO_PLAZO], 
        [Extent1].[FECHA_INICIO] AS [FECHA_INICIO], 
        [Extent1].[FECHA_FIN] AS [FECHA_FIN], 
        [Extent1].[FECHA_EJECUCION_INICIO] AS [FECHA_EJECUCION_INICIO], 
        [Extent1].[FECHA_EJECUCION_FIN] AS [FECHA_EJECUCION_FIN]
        FROM   [dbo].[AESEG_PLAZO] AS [Extent1]
        INNER JOIN [dbo].[AESEG_EXPEDIENTE] AS [Extent2] ON [Extent1].[ID_EXPEDIENTE] = [Extent2].[ID_EXPEDIENTE]
        INNER JOIN [dbo].[SAS_CONVOCATORIA] AS [Extent3] ON [Extent2].[ID_CONVOCATORIA] = [Extent3].[CONV_ID_CONVOCATORIA]
        WHERE ([Extent3].[CONV_PREFIJO_EXP] LIKE '%AC15%' ESCAPE '~') OR ([Extent3].[CONV_DESCRIPCION] LIKE '%AC15%' ESCAPE '~')
    ORDER BY [Extent1].[ID_PLAZO] ASC
    OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY

The query does work and returns 10 results in less than a second, but if I fetch 5 rows it does not end.

I have noticed that the execution plan is a bit different in those cases but I am not an SQL expert. Do you know how to solve this or why is this happening?

[Screenshot: fetch 10 Rows][1]

[Screenshot: fetch 5 Rows][2]


  [1]: https://i.stack.imgur.com/GKEA5.jpg
  [2]: https://i.stack.imgur.com/Rssj7.jpg