你能否在跑测试的时候,同时用下面的sql, 抓一下数据库里面的sql ,我要看看是哪个sql慢的。
你可以用deployop用户执行下面的sql 。
select distinct
s.sid,s.serial#,s.username,p.spid,sw.event,sw.p2,sw.P1RAW,s.sql_hash_value
from v$process p,v$session s,v$session_wait sw
where p.addr=s.PADDR and sw.event not like 'SQL%' and sw.event not like 'rdbms%'
and s.sid=sw.sid
order by event,username,sql_hash_value;
2.
select *
from (select t.name 项目名称,
t.project_code 项目编号,
t.project_money 项目金额,
t.agency_user_id1,
(select x.name from ss_users x where x.id = t.agency_user_id1) b2b项目负责人,
(select wm_concat((select z.name from ss_users z where z.id = y.declare_user_id))
from tb_declare_stock y
where y.id in (select distinct x.dest_id
from tb_stock_project_bundle_chr x
where x.stpr_id = t.id
and x.status = 1)) 项目经办人,
(select wm_concat((select y.name from ss_users y where y.id = x.user_id))
from tb_stpr_team x
where x.stpr_id = t.id
and x.status = 1) 采购小组,
(select wm_concat((select y.name from t_orgs y where y.id = x.supply_id))
from tb_stpr_selected_sup x
where x.stpr_id = t.id
and x.is_selected = 1) 入围供应商
from tb_stock_project t
where t.project_money >= 1000000)
where rownum < 2
from (select t.name 项目名称,
t.project_code 项目编号,
t.project_money 项目金额,
t.agency_user_id1,
(select x.name from ss_users x where x.id = t.agency_user_id1) b2b项目负责人,
(select wm_concat((select z.name from ss_users z where z.id = y.declare_user_id))
from tb_declare_stock y
where y.id in (select distinct x.dest_id
from tb_stock_project_bundle_chr x
where x.stpr_id = t.id
and x.status = 1)) 项目经办人,
(select wm_concat((select y.name from ss_users y where y.id = x.user_id))
from tb_stpr_team x
where x.stpr_id = t.id
and x.status = 1) 采购小组,
(select wm_concat((select y.name from t_orgs y where y.id = x.supply_id))
from tb_stpr_selected_sup x
where x.stpr_id = t.id
and x.is_selected = 1) 入围供应商
from tb_stock_project t
where t.project_money >= 1000000)
where rownum < 2