Mailing List
Home
Forum Home
Oracle List - by freelists.org
Oracle on SUSE Linux - Runing Oracle on SUSE Linux
Oracle database error code ...
www.freelists.org
Subjects
ORA 12540: TNS:internal limit restriction exceeded
ORA 12838 please : Is possible to append two times to the same table befo
ORA 12838 please : Is possible to append two times to the same table before
ora 04031
ora 12500 on windows
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 01925: maximum of 30 enabled roles exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ora 12500 on windows
ORA 01650, one idea
ORA 01650
ORA 4030
ORA 12838 please : Is possible to append two times to thesametable before do
ORA 12838 please : Is possible to append two times to thesame table before d
ORA 01536
ORA 03113 end of file on communication channel
ORA 32004: obsolete and/or deprecated parameter(s) specified
ORA 00600:
ORA 00020: maximum number of processes (%s) exceeded
ORA 01925: maximum of 30 enabled roles exceeded
ORA 3113 while creating a cluster database 9201 RAC on Linux with OCFS
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 01650, one idea
ora 12500 on windows
ora 12500 on windows
ora 12500 on windows
ORA 2000 Error Using DBMS STATS GATHER SCHEMA STATS
ORA 01650, one idea
ORA 01650, one idea
ORA 01650, one idea
ORA 01650
ORA 01650
Subject: ora 01031
ORA 4030
ORA 4030
ORA 06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
Subject: Re: ORA 01722 invalid number
 
How a sort works?

How a sort works?

2007-11-30       - By DEEDSD@(protected)

 Back
Reply:     1     2  

First, allow me to apologize for our Lotus Notes throwing my ID in all
caps.  If someone knows how to turn that annoyance off, please tell me!

We have a fairly sizeable sort order-by (1.2 million rows).
V$session_longops shows that it takes a massive amount of time in this
step.  I have traced the session with 10046.  I am working on tracing this
with 10032 and 10033 events turned on, as well as statistics_level=all so
I can get timings in the stat lines.

I see a big long fetch, then a bunch (190) repetitions of more data to
client of around 2,000 bytes (all but one are of short duration), with
some direct path reads sprinkled in.  I see a more data to client of a
very long duration (in the middle of the 190), more of short duration, and
then another long fetch (these steps repeat).


It looks like the really long "more data to client" time is suspiciously
close to the fetch e - c time.

The way I'm thinking is this:  Oracle sorts some of the data, building a
partial resultset, spews a bunch or rows off to the client, and waits for
some sort output buffer to clear before throwing more rows into it.  The c
time in the fetch is primarily sort time, and v$session longops is
attributing all the time to the sort, in a rather misleading fashion.  The
bottleneck is really how much data the client can take.  Am I correct in
this line of thinking?  I'm also not sure what the long-duration more data
to client is telling me.

Solaris 5.10, Oracle 9.2.0.8

<snip>
WAIT #3: nam='SQL*Net more data to client' ela= 19 p1=1413697536 p2=2000
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 84 p1=1413697536 p2=2001
p3=0
WAIT #3: nam='direct path read' ela= 104 p1=203 p2=16661 p3=1
WAIT #3: nam='SQL*Net more data to client' ela= 148379 p1=1413697536
p2=2001 p3=
0
WAIT #3: nam='SQL*Net more data to client' ela= 22 p1=1413697536 p2=2003
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 33 p1=1413697536 p2=2005
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 38 p1=1413697536 p2=1997
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 35 p1=1413697536 p2=2004
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 36 p1=1413697536 p2=1996
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 31 p1=1413697536 p2=2003
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 32 p1=1413697536 p2=2002
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 28 p1=1413697536 p2=1998
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 28 p1=1413697536 p2=2001
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 36 p1=1413697536 p2=2001
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 29 p1=1413697536 p2=2005
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 30 p1=1413697536 p2=1997
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 29 p1=1413697536 p2=2002
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 45 p1=1413697536 p2=2000
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 30 p1=1413697536 p2=2001
p3=0
WAIT #3: nam='SQL*Net more data to client' ela= 37 p1=1413697536 p2=2006
p3=0
FETCH
#3:c=80000,e=223197,p=48,cr=0,cu=0,mis=0,r=10000,dep=0,og=3,tim=3397704949
096
*** 2007-11-27 14:27:24.028
WAIT #3: nam='SQL*Net message from client' ela= 55007450 p1=1413697536
p2=1 p3=0



<br><font size=2 face="sans-serif">First, allow me to apologize for our
Lotus Notes throwing my ID in all caps. &nbsp;If someone knows how to turn
that annoyance off, please tell me!</font>
<br>
<br><font size=2 face="sans-serif">We have a fairly sizeable sort order-by
(1.2 million rows). &nbsp;V$session_longops shows that it takes a massive
amount of time in this step. &nbsp;I have traced the session with 10046.
&nbsp;I am working on tracing this with 10032 and 10033 events turned on,
as well as statistics_level=all so I can get timings in the stat lines.</font>
<br>
<br><font size=2 face="sans-serif">I see a big long fetch, then a bunch
(190) repetitions of more data to client of around 2,000 bytes (all but
one are of short duration), with some direct path reads sprinkled in. &nbsp;I
see a more data to client of a very long duration (in the middle of the
190), more of short duration, and then another long fetch (these steps
repeat).</font>
<br>
<br>
<br><font size=2 face="sans-serif">It looks like the really long &quot;more
data to client&quot; time is suspiciously close to the fetch e - c time.</font>
<br>
<br><font size=2 face="sans-serif">The way I'm thinking is this: &nbsp;Oracle
sorts some of the data, building a partial resultset, spews a bunch or
rows off to the client, and waits for some sort output buffer to clear
before throwing more rows into it. &nbsp;The c time in the fetch is primarily
sort time, and v$session longops is attributing all the time to the sort,
in a rather misleading fashion. &nbsp;The bottleneck is really how much
data the client can take. &nbsp;Am I correct in this line of thinking?
&nbsp;I'm also not sure what the long-duration more data to client is telling
me.</font>
<br>
<br><font size=2 face="sans-serif">Solaris 5.10, Oracle 9.2.0.8</font>
<br>
<br><font size=2 face="sans-serif">&lt;snip&gt;</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 19 p1=1413697536 p2=2000 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 84 p1=1413697536 p2=2001 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='direct path read' ela=
104 p1=203 p2=16661 p3=1</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 148379 p1=1413697536 p2=2001 p3=</font>
<br><font size=2 face="sans-serif">0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 22 p1=1413697536 p2=2003 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 33 p1=1413697536 p2=2005 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 38 p1=1413697536 p2=1997 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 35 p1=1413697536 p2=2004 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 36 p1=1413697536 p2=1996 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 31 p1=1413697536 p2=2003 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 32 p1=1413697536 p2=2002 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 28 p1=1413697536 p2=1998 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 28 p1=1413697536 p2=2001 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 36 p1=1413697536 p2=2001 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 29 p1=1413697536 p2=2005 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 30 p1=1413697536 p2=1997 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 29 p1=1413697536 p2=2002 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 45 p1=1413697536 p2=2000 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 30 p1=1413697536 p2=2001 p3=0</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net more data to client'
ela= 37 p1=1413697536 p2=2006 p3=0</font>
<br><font size=2 face="sans-serif">FETCH #3:c=80000,e=223197,p=48,cr=0,cu=0,mis
=0,r=10000,dep=0,og=3,tim=3397704949</font>
<br><font size=2 face="sans-serif">096</font>
<br><font size=2 face="sans-serif">*** 2007-11-27 14:27:24.028</font>
<br><font size=2 face="sans-serif">WAIT #3: nam='SQL*Net message from client'
ela= 55007450 p1=1413697536 p2=1 p3=0</font>
<br>
<br>