Too many number of executions in execution plan when using ROW_NUMBER paging in sql server
<p>IN SQL SERVER 2008.</p>

<p>I have a table having huge rows. I implemented paging using row_number. But I think it isn't effective cost. </p>

<p>Execution plan
<a href="https://i.stack.imgur.com/dFvBJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dFvBJ.png" alt="enter image description here"></a></p>

<p>The Number of Executions => 15005.
If I change 15005 to 150005 then, The number of Excutions increases to 150005.</p>

<p>Is it ok? Is there any method reducing this number of excutions?</p>

<p>This is my query</p>

<pre><code>SELECT *
FROM 
(
    select *, ROW_NUMBER() OVER(ORDER BY send_time) as row_num
    FROM [dbo].[GlobalMessage]
    WHERE active =1
) as T
WHERE row_num &gt;= 15000 and row_num &lt; 15005
</code></pre>

<p>and Table info</p>

<pre><code>CREATE TABLE [dbo].[GlobalMessage](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [active] [int] NOT NULL,
    [message] [nvarchar](200) NOT NULL,
    [send_time] [int] NOT NULL,
 CONSTRAINT [PK_GlobalMessage] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

CREATE NONCLUSTERED INDEX [NonClusteredIndex-20160823-125945] ON [dbo].[GlobalMessage]
(
    [active] ASC,
    [send_time] DESC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
</code></pre>