Hi to all,
May I know what is the best approach for this.
I have a CTE query a complex one, more inner joins and left joins... Our requirements is to do a paging so we use a Row_Number() to do paging and displaying 20 rows. And also we have also display the total data which is around 50,000 plus.
What I did is to use the same query (without Row_Number) but instead using count(*) to display the number of rows which is pass to a variable. Below that query-count is the query (CTE) that i used to display the data.
May I know what is the best approach for this? Performance wise?
<Count query>
<CTE query with paging>
3 stars and a sun
No comments:
Post a Comment