硬解析太多是没有使用绑定变量。
才30-40个并发用户,你的机很轻松了。不过有两条SQL一致性读太多,优化即可。
select sb.brandname, sb.id, tt.cnt from sw_brand sb join (select sp.brandid, count(1) as cnt from sw_products sp where sp.typeid in (select distinct id from sw_products_type start with id = 1 connect by prior id = pid) and sp.isonsale = 1 and sp.sdell = 0 group by sp.brandid) tt on sb.id = tt.brandid;
select * from (select p.id, p.productsid, p.productsname, p.pic from sw_products p where p.typeid in(select distinct id from sw_products_type start with id = 1 connect by prior id = pid) and p.ISONSALE=1 and p.SDELL=0 order by p.id desc) where rownumshow parameter sga
NAME
TYPEVALUE
------------------------------------ ----------- -------
lock_sga
boolean FALSE
pre_page_sga
boolean FALSE
sga_max_size
big integer 2G
sga_target
big integer 2G
SQL> show parameter pga
NAME
TYPEVALUE
------------------------------------ ----------- -------
pga_aggregate_target
big integer 512M
SGA已经是2G了,buffer cache怎么调整~
|