Ticket #43 (closed 优化: fixed)

Opened 15 years ago

Last modified 13 years ago

sql 优化

Reported by: chenchongqi Owned by: yuanhuoqing
Priority: major Milestone:
Component: 产品库 Version: 产品库3.0
Keywords: Cc:
Due Date:

Description

这类查询比较多,需要改为绑定变量的方式。

select * from ( select f.name as variance_name, a.*,(
a.last_count_order-a.count_order) as rise_diff ,b.name as t_name,b.parent_id as
t_parent_id,b.forum_dir,b.forum_id as t_forum_id,b.pub_url as t_pub_url,b.pub_di
r ,d.price as area_price , nvl(e.min_price,0) as min_price, nvl(e.max_price,0)

as max_price from PDL_PRODUCT a, PDL_PRODUCT_TYPE b ,( SELECT * FROM PP_PRICE
WHERE PRICE BETWEEN 6001 AND 7000 AND AREA_ID = 100) d,eml_price e ,pdl_produc

t_variance f where a.status!=0 and a.review_status<>4 and a.order_type<2 and a.c
oncept is null and a.type_id=b.id and b.status=1 and b.type=3 and b.parent_id=:
1 and a.id=d.product_id and e.product_id(+)= a.id and a.variance_id=f.id(+)

order by a.last_count_order asc) where rownum <= :2

Change History

comment:1 Changed 14 years ago by chenchongqi

  • Status changed from new to assigned
  • Owner set to yuanhuoqing
  • Version set to 3.0

comment:2 Changed 14 years ago by chenchongqi

  • Milestone 2011产品报价库改版二期 deleted

comment:3 Changed 13 years ago by chenchongqi

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.