Database Tuning (MOSC)

MOSC Banner

Query tuning

edited May 18, 2011 5:37PM in Database Tuning (MOSC) 9 commentsAnswered
   Below is the query and its plan
select a.src_id shortcode,a.pre_res_type prt,nvl(a.mtcount,0) txtcnt,
  nvl(a.mtrevenue/100,0) txtrev,nvl(b.mtcount,0) nontxtcnt,nvl(b.mtrevenue/100,0) nontxtrev,
nvl(c.mtcount,0) subcnt,nvl(c.mtrevenue/100,0) subrev
from (select src_id,pre_res_type,count(1) mtcount,sum(pur_price_exvat) mtrevenue from view_sms_mt where pre_res_type
not in ('RT%','PIC%','SUB%') and todate between '01-Apr-2011' and '30-Apr-2011' group by src_id,pre_res_type) a,
 (select src_id,pre_res_type,count(1) mtcount,sum(pur_price_exvat) mtrevenue from view_sms_mt where pre_res_type in ('RT%','PIC%') and    

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center