我正在尝试用一些新像素进行资源监视,并想知道如何通过串行发送字符串,并让我的gemma m0监听该字符串。抱歉,如果我使用了错误的术语,这是很新的。
答案 0 :(得分:0)
对我来说如下:
DECLARE
@PageSize INT = 10,
@PageNum INT = 1,
@MaxRows bigint = (SELECT COUNT(1) FROM Table Where ID in ( 1 ,2 3, 4, 5, 6, 7, 8, 9 ,10));
WITH TempResult AS(
SELECT ID, Name
FROM Table
Where ID in ( 1 ,2 3, 4, 5, 6, 7, 8, 9 ,10)
)
SELECT *
FROM TempResult,
@MaxRows TempCount <----- this is what is slow. Removing this and the query is super fast
ORDER BY TempResult.Name
OFFSET (@PageNum-1)*@PageSize ROWS
FETCH NEXT @PageSize ROWS ONLY