RE: more on 'high cpu...'

Sure, the DISTINCT is forcing a sort.  Depending on the view definition, 
whether you're applying any predicates in your select from the view, and 
whether those predicates can be pushed down (will depend on the view 
definition), this could have a noticeable effect on performance.

-Mark

--
Mark J. Bobak
Senior Database Administrator, System & Product Technologies
ProQuest
789 E. Eisenhower, Parkway, P.O. Box 1346
Ann Arbor MI 48106-1346
734.997.4059  or 800.521.0600 x 4059
mark.bobak@xxxxxxxxxxxxxxx
www.proquest.com
www.csa.com

ProQuest...Start here. 


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Joe Armstrong-Champ
Sent: Monday, July 02, 2007 11:35 AM
To: ORACLE-L
Subject: more on 'high cpu...'

I'm still doing the traces but in the meantime I thought I'd ask a 
follow up question. The query is selecting from a view. The view returns 
hundreds of rows relatively quickly. The query itself is selecting 
DISTINCT rows from the view. When I take out the distinct it returns 
almost instantaneously. With the distinct in it takes 40 - 50 secs. Does 
this ring a bell with anyone?


--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l


Other related posts: