Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AJA
Starting Member
3 Posts |
Posted - 2009-08-18 : 09:03:36
|
| Hi,I have to implement paging in my application and my SP fetches data for 2 different entities in same query using union which is my application requirement.ex. @Start,@end,@reccountwith cte(Rownum,a,b)as(select Row_Number() Over (Order by x.a).x.*from(select top(@reccount),a,b from table1union all select top(@reccount),a,b from table2)x)select * from cte where rownum between @start and @endSo in this way my call become very costly. i am trying to tune it further.Please suggest if i can do better in case.Thanks in advance.I wish, I wasn't so niceI wish, I wasn't so nice ! |
|
|
|
|
|