使用hint来调优sql语句
生产发现有一个sql语句运行耗时达5000多秒。抓出来sql_id一看,sql倒不是一个很长的语句。结构也很简单。如下。select company_code, sap_company_id from data_company_code where company_code not in (SELECT dist inct l9_company_code F...
几个行列转换的实用小例子
create table session_test as select *from v$session;select count(*)cnt,status from session_test group by status;STATUSVARCHAR2(8)Status of the session:ACTIVE - Session currently executing SQL...