sql 语句优化,求帮忙

Select t9.Product_ID,a.Product_Name,a.Product_BuyNum, b.Org_Price, b.Sale_Price, c.Img_Small, c.Img_Middle,
isnull((select SubShop_Price from subshop_product where subshop_id=1057 and product_id=a.product_id),b.Sug_Price) as SubShop_Price, b.Sug_Price,a.Product_SeeNum,a.AddTime,
a.orderid From
(
Select Top 30 product_id from
(
Select row_number() over(order by a.product_id desc) as rownumber,a.product_id

From Product_Info a
Inner Join Product_Price b On a.Product_ID = b.Product_ID

Inner Join SubShop_ProductRight d ON a.Class_ID = d.Class_ID AND d.SubShop_ID=1057

Where ((a.SubShop_ID is null or a.SubShop_ID=-1) or ((a.SubShop_ID=1057 or a.Is_AllShow=0 ) and Is_Audit=0))
and a.IsHidden = 0 And a.IsDelete = 0
And a.Product_Name Like '%%' and a.Product_ID
not in (select product_id from SubShop_Product where IsHidden=1 and SubShop_ID=1057)

) t
where rownumber>4170 Order By rownumber
) as t9
inner join Product_Info a on a.Product_ID=t9.Product_ID
Inner Join Product_Price b On a.Product_ID = b.Product_ID left Join Product_Detail c On a.Product_ID = c.Product_ID

rownumber>4170 这个数值会根据不同页数变化,求解怎么优化,这个占用CPU很高,导致系统速度慢

你那个算法太多了,能不能精简一下

要看懂起码要半个小时,再写一下又要半个小时,只能呵呵了!!!!

你不要直接贴语句 把相关的表结构和功能说出来 需要达到什么样的效果
要不你这样别人只能在你的思路上进行修改 没啥作用

data structure, tables relationship, foreign key, primary key.
查詢目的。這些都沒有,