While studying different query plans to improve performance I noticed that FETCH is doing an implicit convert to bigint
.
Example table and query:
CREATE TABLE checkPagintion
(
Id INT NOT NULL PRIMARY KEY CLUSTERED,
Name NVARCHAR(100)
)
DECLARE @paramPageNumber AS INT,
@paramPageSize AS INT;
SELECT *
FROM checkPagintion
ORDER BY Id
OFFSET @paramPageNumber ROWS
FETCH NEXT @paramPageSize ROWS ONLY
Execution plan for this query:
My question: should I use bigint for all pagination queries? If I use int will it a be a problem since implict_conversion is known for slow performance?