Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from smtp-aa.freelists.org (smtp-aa.freelists.org [23.23.80.81])
 by malta2546.startdedicated.com (Postfix) with ESMTPS id 50504100307714
 for <oracle-l@orafaq.com>; Tue,  2 Feb 2021 15:30:26 +0100 (CET)
Received: from turing.freelists.org (ip-10-0-0-164.ec2.internal [10.0.0.164])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by smtp-aa.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 4593A45588;
 Tue,  2 Feb 2021 14:30:25 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 316D13F971;
 Tue,  2 Feb 2021 14:30:25 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1612276225;
 bh=SqgPstr3PNh0VPIMDNqxdOHIjjLvhWAtm2KpHxoT3xM=;
 h=From:Sender:Sender:From;
 b=i1VRZggUlAUvBU4Eg6szYl6VXIXj45L98PCv+eUPNqdrawoh+BAYPM9r882I6P1Vu
	 e5zbBs389S4SAapyTlmlWqxREf7jyCAYHV5vrIUsP+pObaCmzA31vH4KPz589DEw6Q
	 zSY39XCsRnAzgplLS/xG9fYh02On+x/UMvhhMHuA=
X-Virus-Scanned: by FreeLists at turing2.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id PWEw8pCIm4zS; Tue,  2 Feb 2021 14:30:25 +0000 (UTC)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id A89E33F85E;
 Tue,  2 Feb 2021 14:30:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1612276223;
 bh=SqgPstr3PNh0VPIMDNqxdOHIjjLvhWAtm2KpHxoT3xM=;
 h=From:Sender:Sender:From;
 b=JIfotSTPq80Jio+WzXOlMndQFqjN+qn825vuoyC7y8a/JgRlDLaTbyRow3ZuMscqB
	 /SK/BCFkqLNbAzClS78kPBwGYip8uOqI9rtpTWziqJWap/Yxekipsh2lx8OOi5a4Rv
	 PSKTl8VEqv4tUM60ikMrHxKTIg5QOcVEacDMdvWM=
Received: with ECARTIS (v1.0.0; list oracle-l); Tue, 02 Feb 2021 14:30:21 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 6DF3A3F972
 for <oracle-l@freelists.org>; Tue,  2 Feb 2021 14:30:21 +0000 (UTC)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id jL-F9I2Gv0Gj for <oracle-l@freelists.org>;
 Tue,  2 Feb 2021 14:30:21 +0000 (UTC)
Received: from gw2.tidalhosting.net (gateway.tidalhosting.net [155.130.128.124])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by turing.freelists.org (Postfix) with ESMTPS id 34C883F970
 for <oracle-l@freelists.org>; Tue,  2 Feb 2021 14:30:20 +0000 (UTC)
Received: from mrtr.tidalhosting.net (UnknownHost [10.0.150.3]) by gw2.tidalhosting.net with SMTP
 (version=TLS\Tls12
 cipher=Aes256 bits=256);
   Tue, 2 Feb 2021 09:30:11 -0500
Received: from mx1.tidalhosting.net (unknown [10.0.100.9])
 by mrtr.tidalhosting.net (Postfix) with ESMTPS id 94B293049D7C;
 Tue,  2 Feb 2021 09:30:06 -0500 (EST)
Received: from mwf4500 (c-73-238-99-41.hsd1.nh.comcast.net [73.238.99.41]) by mx1.tidalhosting.net with SMTP
 (version=Tls
 cipher=Aes256 bits=256);
   Tue, 2 Feb 2021 09:29:48 -0500
From: "Mark W. Farnham" <mwf@rsiz.com>
To: <laurentiu.oprea06@gmail.com>,
 "'Mohamed Houri'" <mohamed.houri@gmail.com>
Cc: "'Pap'" <oracle.developer35@gmail.com>,
 "'Chinar Aliyev'" <chinaraliyev@gmail.com>,
 "'Sayan Malakshinov'" <xt.and.r@gmail.com>,
 "'Oracle L'" <oracle-l@freelists.org>
References: <CAEjw_fg5yfOWT2KOkYRn+pqkMhgRJC+cQnuSPO+Uz5s2m9DnBA@mail.gmail.com> <CAOVevU5ZH2_znOXdVLid445nC-c5vZRddoDSZ+tDMUPM1RKz7Q@mail.gmail.com> <CA+riqSXW1K7X+B2wF-=tT0mxPncTRrtKt28KqBJrstnypb6TyQ@mail.gmail.com> <CAEjw_fhO-VurdrgCLxse=s4r-CxmRtVGpBVvD+nCNmUrT3inMg@mail.gmail.com> <CAEfe=X_DTUd6bbY8VuQ4ZUrR89oHQm0e_H0w=vzrP7YwXkRjQQ@mail.gmail.com> <CAJu8R6iDhUQv=uPN_UsgLd_opCU+Q4+T-jUzd_qd-=xp6f-JzA@mail.gmail.com> <CAEjw_fhwEGLh8tFzfs5hfODx61u+yk7JAb6XAxB0k-KCcO5V3A@mail.gmail.com> <CA+riqSXZ8pYhmM4c7smzwK4H=pJaRaOmBAVLOJ4nfqmY9g-q1A@mail.gmail.com> <CAJu8R6jXi-QodM-BzKhDOSw0Ji6XWNuSp0BpVtivGizSY8Ng3w@mail.gmail.com> <CA+riqSUVKX7x5P_ENCGzJ51WEb07=qiyQeS_LZ0CZVXJCCBQKQ@mail.gmail.com>
In-Reply-To: <CA+riqSUVKX7x5P_ENCGzJ51WEb07=qiyQeS_LZ0CZVXJCCBQKQ@mail.gmail.com>
Subject: RE: Library lock issue
Date: Tue, 2 Feb 2021 09:29:43 -0500
Message-ID: <2df701d6f96f$da147c30$8e3d7490$@rsiz.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----=_NextPart_000_2DF8_01D6F945.F1435630"
Content-Language: en-us
X-Exim-Id: 2df701d6f96f$da147c30$8e3d7490$
X-archive-position: 78825
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: mwf@rsiz.com
Precedence: normal
Reply-To: mwf@rsiz.com
List-Help: <mailto:ecartis@freelists.org?Subject=help>
List-Unsubscribe: <mailto:oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-Subscribe: <mailto:oracle-l-request@freelists.org?Subject=subscribe>
List-Owner: <mailto:>
List-post: <mailto:oracle-l@freelists.org>
List-Archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
------=_NextPart_000_2DF8_01D6F945.F1435630
Content-Type: text/plain;
 charset="utf-8"
Content-Transfer-Encoding: quoted-printable

I know that the bug fix was back ported to 12r1 in a specific patch, but =
those notes were entangled with a confidential access to which I was not =
allowed to make notes aside from what I keep in my head.

=20

IF I recall correctly that might have been a one-off and not necessarily =
bundled compatibly with 12r1=E2=80=99s upgrade and patches because 12r2 =
was coming out with it already fixed.

=20

mwf

=20

From: oracle-l-bounce@freelists.org =
[mailto:oracle-l-bounce@freelists.org] On Behalf Of Laurentiu Oprea
Sent: Tuesday, February 02, 2021 5:23 AM
To: Mohamed Houri
Cc: Pap; Chinar Aliyev; Sayan Malakshinov; Oracle L
Subject: Re: Library lock issue

=20

Nice one, thanks Mohamed. I`ll update on this thread once I reach the =
bottom of my issues as well.=20

=20

=C3=8En mar., 2 feb. 2021 la 12:19, Mohamed Houri =
<mohamed.houri@gmail.com> a scris:

@Laurentiu

As I mentioned above it was a kind of bug or kind of =E2=80=9Cwe =
don=E2=80=99t know why when using bind variable PX slaves were refusing =
to share the execution plan of their QC=E2=80=9D. I have had an =
excellent private discussion with Oracle support engineer about this =
issue and he clearly explained that this was reported to the CBO team.

So, I am sorry I haven=E2=80=99t any bug to share with you for this =
issue. Moreover, it happened in 12cR1 and, as I said above, I still have =
not encountered a similar issue in 12cR2, 18c, and 19c where I am using =
parallelism extensively

@Pap

My answer was that, probably, your parallel parsing issue is due to the =
usage of GTT private statistics. So if your planned fix tentative will =
reveal to be useless, I would then suggest checking if using GTT shared =
statistics will get rid of the library cache lock and cursor pin S wait =
on x wait events. If so then you have to balance between sharing =
inadequate GTT statistics and parsing effects.

=20

=E2=80=9CAll things being equal you must balance between the performance =
improvement brought by this new GTT feature and the parsing side effect =
it introduces because of the underlying cursor invalidation. In my =
client case, the Library cache and Cursor Pin S wait on X wait events =
introduced by the SESSION PRIVATE statistics largely outweigh the =
performance penalty that comes when the 49 streams share the same GTT =
statistics.=E2=80=9D

=20

Best regards

Mohamed Houri

=20

Le mar. 2 f=C3=A9vr. 2021 =C3=A0 11:10, Laurentiu Oprea =
<laurentiu.oprea06@gmail.com> a =C3=A9crit :

Hello Pap,

=20

I was mentioning DS in the context of possible bug as well. If L2 is =
used most probably you don't have an issue around this and your issue =
might be around GTTs stats.

=20

=C3=8En mar., 2 feb. 2021 la 11:57, Pap <oracle.developer35@gmail.com> a =
scris:

Thanks much.

=20

For that query , I see the below note section. And as i mentioned are =
using private session level stats collected for two of the global =
temporary tables but one global temp table is having null stats and so =
perhaps for that the dynamic sampling is triggered. In our case we are =
not using bind variables in this query but literals. But anyway , I am =
planning to set the paralle_force_local to TRUE in the session level and =
along with that we will collect the stats on all the three tables =
setting all of them to use private session level stats , hopefully that =
will also make optimizer get rid of the dynamic sampling part.=20

=20

We can't set the dynamic sampling level to zero for this query because =
we are many times getting a bad execution path and to help fix that we =
need accurate stats , so I think private session level stats for all =
three tables is the one to go for in our case. Correct me if wrong.

=20

Also can you please share the exact bug which you are talking of.=20

=20

=20

Note

-----

  - dynamic statistics used: dynamic sampling (level=3D2)

=20

Regards

Pap

=20

On Tue, Feb 2, 2021 at 2:32 PM Mohamed Houri <mohamed.houri@gmail.com> =
wrote:

=20

I have faced a similar 12cR1 issue of parallel slave (PX) refusing to =
share the execution plan of their query coordinator (QC) despite both QC =
and its PX slaves were in the same instance. It turned to be a kind of =
bug because of the usage of bind variable (yes using bind variables !!) =
and dynamic sampling.=20

 But here you are using literals and GTT with private statistics. Bear =
in mind that when you are using session private statistics Oracle will =
not propagate GTT private statistics from one session to another one. It =
achieves this by invalidating similar cursor between sessions.

https://hourim.wordpress.com/2019/07/30/global-temporary-table-private-st=
atistic =
<https://hourim.wordpress.com/2019/07/30/global-temporary-table-private-s=
tatistics/>=20

=20

That=E2=80=99s said I haven=E2=80=99t tested how Oracle will consider =
the QC coordinator session per regards to its PX slave sessions in case =
of private GTT sessions.=20

You can see if your execution plan has the following Note signaling that =
it has used a GTT private statistics or not

Note=20

-----=20

-- Global temporary table session private statistics used

=20

And use Tanel Poder nonshared sql script to get the reason for which PX =
slaves are refusing the share the execution plan of their QC

=20

Best Regards

Mohamed Houri

=20

Le mar. 2 f=C3=A9vr. 2021 =C3=A0 09:42, Chinar Aliyev =
<chinaraliyev@gmail.com> a =C3=A9crit :

Hi,

There are several bugs in Oracle Support and might one of them be =
appropriate for your case.

=20

It happens when QC and PX Slaves are allocated in different instances, =
and a remote slave has to parse the statement based on the info sent by =
QC (to achieve the same execution plan generated by QC).=20

To reduce parsing you can force it as Sayan has mentioned. Also, check =
support notes/bugs.

=20

Best Regards=20

=20

On Tue, Feb 2, 2021 at 11:12 AM Pap <oracle.developer35@gmail.com> =
wrote:

Thanks a lot.

=20

We will definitely try rerunning by setting session level =
"parallel_force_local" parameter to true as we set this value as 'FALSE' =
in v$parameter.

=20

"parallel slaves will not be able to join the execution because they are =
not able to reproduce the same execution plan as the coordinator. "

=20

I am a bit confused with above statement on the dynamic sampling part, I =
see out of three global temporary tables used in this query , two of =
them are using private session level stats as it's gathered inside the =
code. But one(RTNI) is having stats set as NULL and also its locked , =
which means the dynamic sampling must have been triggered for that table =
only. But in that case too, i am not able to understand how the dynamic =
sampling can be the cause, can you please explain bit more. As because , =
my understanding is parsing will happen at the first stage and till that =
time parallel slaves wont get involve in real execution. So as the table =
related info will be available in the node-3 as that being the session =
of the query coordinator/parent session , so that should only do the =
parsing work. Please correct me if wrong.

=20

Regards

Pap

=20

On Tue, Feb 2, 2021 at 11:20 AM Laurentiu Oprea =
<laurentiu.oprea06@gmail.com> wrote:

Hello,

=20

Additional to what has been mentioned, usually this issue is caused by =
the fact that parallel slaves will not be able to join the execution =
because they are not able to reproduce the same execution plan as the =
coordinator.=20

Dynamic Sampling is often one of the root causes for this issue, If DS =
is not helping in your case you can create a spl patch for that sql with =
a lower level of DS or even disable it : dynamic_sampling(0).

=20

Good luck

=20

=C3=8En lun., 1 feb. 2021 la 23:53, Sayan Malakshinov =
<xt.and.r@gmail.com> a scris:

Hi Pap,

=20

Have you tried to set parallel_force_local=3Dtrue? Your QC is on Node 3 =
while your slaves are on Node 2:

1. Parallel queries usually work much better if they don't need to send =
data between nodes and fight for concurrent access to the same data;

2. You are using global temporary tables, so their data is private for =
your session and stored on the same node as your session. In case of =
parallel access to GTT, QC has to send also their segment info, so your =
slaves have to request data from it, ie from Node 3.

3. Also that means that node 2 have to parse your query too for your =
slaves (sometimes it even leads to more child cursors)

=20

On Mon, Feb 1, 2021 at 10:28 PM Pap <oracle.developer35@gmail.com> =
wrote:

Hello All, We are seeing some odd behaviour. Its version 12.1.0.2.0 of =
oracle. And a small query(finishing in <1 minutes) which is executing in =
parallel(2) is experiencing "library cache lock" and "cursor: pin S wait =
on X" between its own slaves. I mean to say the blocking session is =
appearing as its own slave sessions. We have "parallel_degree_policy" =
set as MANUAL in v$parametr. This query is running for different =
literals one after another multiple times in a loop fashion. And all =
these samples logged in dba_hist_active_sess_history showing IN_PARSE as =
'Y'. Dueto these waits the overall execution time of the process is =
going beyond ~5hrs+. The CPU and IO waits as noted in sql monitor is =
very small. Wondering how parallel slave processes of the same query are =
blocking each other during parsing itself. Or are we hitting any bug in =
this version?

Attached is the sql and its run time sql monitor. And all the tables =
used in this query are global temporary tables "on commit preserve row" =
types.

=20

=20

Thanks And Regards

Pap




=20

--=20

Best regards,
Sayan Malakshinov

Oracle performance tuning engineer

Oracle ACE Associate
http://orasql.org




=20

--=20

Chinar Aliyev

=20

  =
<https://docs.google.com/uc?export=3Ddownload&id=3D1HYf9FoBNXnnwwf-tYZFjA=
kMCrzg_Yddo&revid=3D0B-QXE3D0UMX1ZFN1d3RhcXZCODhjU3JEVkJsa1F2eEp0eDRVPQ> =


Visit My         :Blog <http://chinaraliyev.wordpress.com/>=20

Let's Connect - <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>   =
<https://www.linkedin.com/in/chinaraliyev/> Linkedin Profile

My  <https://twitter.com/MohamedHouri> Twitter      -  =
<https://twitter.com/ChinarAliyev> ChinarAliyev

=20




=20

--=20

Houri Mohamed=20

Oracle DBA-Developer-Performance & Tuning=20

Visit My         - Blog <http://www.hourim.wordpress.com/>=20

Let's Connect - <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>  =
Linkedin Profile <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>=20

My  <https://twitter.com/MohamedHouri> Twitter      - MohamedHouri =
<https://twitter.com/MohamedHouri>=20




=20

--=20

Houri Mohamed=20

Oracle DBA-Developer-Performance & Tuning=20

Visit My         - Blog <http://www.hourim.wordpress.com/>=20

Let's Connect - <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>  =
Linkedin Profile <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>=20

My  <https://twitter.com/MohamedHouri> Twitter      - MohamedHouri =
<https://twitter.com/MohamedHouri>=20


------=_NextPart_000_2DF8_01D6F945.F1435630
Content-Type: text/html;
 charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 14 (filtered medium)"><!--[if =
!mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"Trebuchet MS";
	panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"Oracle Sans";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>I know that the bug fix was back ported to 12r1 in a specific patch, =
but those notes were entangled with a confidential access to which I was =
not allowed to make notes aside from what I keep in my =
head.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>IF I recall correctly that might have been a one-off and not =
necessarily bundled compatibly with 12r1=E2=80=99s upgrade and patches =
because 12r2 was coming out with it already =
fixed.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>mwf<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:14.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] =
<b>On Behalf Of </b>Laurentiu Oprea<br><b>Sent:</b> Tuesday, February =
02, 2021 5:23 AM<br><b>To:</b> Mohamed Houri<br><b>Cc:</b> Pap; Chinar =
Aliyev; Sayan Malakshinov; Oracle L<br><b>Subject:</b> Re: Library lock =
issue<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>Nice =
one, thanks Mohamed. I`ll update on this thread once I reach the bottom =
of my issues as well.&nbsp;<o:p></o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>=C3=8En mar., 2 feb. 2021 la 12:19, Mohamed Houri =
&lt;<a =
href=3D"mailto:mohamed.houri@gmail.com">mohamed.houri@gmail.com</a>&gt; =
a scris:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>@Laurentiu</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>As I mentioned above it was =
a kind of bug or kind of =E2=80=9Cwe don=E2=80=99t know why when using =
bind variable PX slaves were refusing to share the execution plan of =
their QC=E2=80=9D. I have had an excellent private discussion with =
Oracle support engineer about this issue and he clearly explained that =
this was reported to the CBO team.</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>So, I am sorry I =
haven=E2=80=99t any bug to share with you for this issue. Moreover, it =
happened in 12cR1 and, as I said above, I still have not encountered a =
similar issue in 12cR2, 18c, and 19c where I am using parallelism =
extensively</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>@Pap</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>My answer was that, =
<b>probably</b>, your parallel parsing issue is due to the usage of GTT =
private statistics. So if your planned fix tentative will reveal to be =
useless, I would then suggest checking if using GTT shared statistics =
will get rid of the library cache lock and cursor pin S wait on x wait =
events. If so then you have to balance between sharing inadequate GTT =
statistics and parsing effects.</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>&nbsp;</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><i><span =
style=3D'font-size:9.5pt;line-height:115%;font-family:"Verdana","sans-ser=
if";color:black'>=E2=80=9CAll things being equal you must balance =
between the performance improvement brought by this new GTT feature and =
the parsing side effect it introduces because of the underlying cursor =
invalidation. In my client case, the Library cache and Cursor Pin S wait =
on X wait events introduced by the SESSION PRIVATE statistics largely =
outweigh the performance penalty that comes when the 49 streams share =
the same GTT statistics.=E2=80=9D</span></i><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>&nbsp;</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>Best regards</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>Mohamed Houri</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>Le&nbsp;mar. 2 f=C3=A9vr. 2021 =C3=A0&nbsp;11:10, =
Laurentiu Oprea &lt;<a href=3D"mailto:laurentiu.oprea06@gmail.com" =
target=3D"_blank">laurentiu.oprea06@gmail.com</a>&gt; a =
=C3=A9crit&nbsp;:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p =
class=3DMsoNormal>Hello Pap,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>I =
was mentioning DS in the context of possible bug as well. If L2 is used =
most probably&nbsp;you don't have an issue around this and your issue =
might be around GTTs stats.<o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>=C3=8En mar., 2 feb. 2021 la 11:57, Pap &lt;<a =
href=3D"mailto:oracle.developer35@gmail.com" =
target=3D"_blank">oracle.developer35@gmail.com</a>&gt; a =
scris:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p =
class=3DMsoNormal>Thanks much.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>For that query , I see the below note section. And as =
i mentioned are using private session level stats collected for two of =
the global temporary tables but one global temp table is having null =
stats and so perhaps for that the dynamic sampling is triggered. In our =
case we are not using bind variables in this query but literals. But =
anyway , I am planning to set the paralle_force_local to TRUE in the =
session level and along with that we will collect the stats on all the =
three tables setting all of them to use private session level stats , =
hopefully that will also make optimizer&nbsp;get rid of the dynamic =
sampling part.&nbsp;<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>We can't set the dynamic sampling level to zero for =
this query because we are many times getting a bad execution path and to =
help fix that we need accurate stats , so I think private session level =
stats for all three tables is the one to go for in our case. Correct me =
if wrong.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Also can you please share the exact bug which you are =
talking of.&nbsp;<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Note<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>-----<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:2.25pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>&nbsp;&nbsp;- dynamic statistics used: =
dynamic sampling (level=3D2)<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:2.25pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'><o:p>&nbsp;</o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:2.25pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Regards<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:2.25pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Pap<o:p></o:p></span></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Tue, Feb 2, 2021 at 2:32 PM Mohamed Houri &lt;<a =
href=3D"mailto:mohamed.houri@gmail.com" =
target=3D"_blank">mohamed.houri@gmail.com</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>I have faced a similar =
12cR1 issue of parallel slave (PX) refusing to share the execution plan =
of their query coordinator (QC) despite both QC and its PX slaves were =
in the same instance. It turned to be a kind of bug because of the usage =
of bind variable (yes using bind variables !!) and dynamic sampling. =
</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>&nbsp;But here you are =
using literals and GTT with private statistics. Bear in mind that when =
you are using session private statistics Oracle will not propagate GTT =
private statistics from one session to another one. It achieves this by =
invalidating similar cursor between sessions.</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'><a =
href=3D"https://hourim.wordpress.com/2019/07/30/global-temporary-table-pr=
ivate-statistics/" =
target=3D"_blank">https://hourim.wordpress.com/2019/07/30/global-temporar=
y-table-private-statistic</a></span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>That=E2=80=99s said I =
haven=E2=80=99t tested how Oracle will consider the QC coordinator =
session per regards to its PX slave sessions in case of private GTT =
sessions. </span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>You can see if your =
execution plan has the following Note signaling that it has used a GTT =
private statistics or not</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'line-height:19.8pt'><span style=3D'font-family:"Courier =
New";color:black'>Note </span><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p>=
</span></p><p class=3DMsoNormal style=3D'line-height:19.8pt'><span =
style=3D'font-family:"Courier New";color:black'>----- </span><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p>=
</span></p><p class=3DMsoNormal style=3D'line-height:19.8pt'><span =
style=3D'font-family:"Courier New";color:black'>-- Global temporary =
table session private statistics used</span><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p>=
</span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>&nbsp;</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>And use Tanel Poder =
nonshared sql script to get the reason for which PX slaves are refusing =
the share the execution plan of their QC</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>Best Regards</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:10.0pt;line-height:115%'><span =
style=3D'font-family:"Calibri","sans-serif"'>Mohamed Houri</span><span =
style=3D'font-size:11.0pt;line-height:115%;font-family:"Calibri","sans-se=
rif"'><o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>Le&nbsp;mar. 2 f=C3=A9vr. 2021 =C3=A0&nbsp;09:42, =
Chinar Aliyev &lt;<a href=3D"mailto:chinaraliyev@gmail.com" =
target=3D"_blank">chinaraliyev@gmail.com</a>&gt; a =
=C3=A9crit&nbsp;:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p =
class=3DMsoNormal><span =
style=3D'font-family:"Tahoma","sans-serif"'>Hi,</span><o:p></o:p></p></di=
v><div><p class=3DMsoNormal><span =
style=3D'font-family:"Tahoma","sans-serif"'>There are several bugs in =
Oracle Support and might one of them be appropriate for your =
case.</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><span style=3D'font-family:"Tahoma","sans-serif"'>It =
happens&nbsp;when QC and PX Slaves are allocated in different instances, =
and a remote&nbsp;slave has to parse the statement based on the =
info&nbsp;</span>sent&nbsp;<span =
style=3D'font-family:"Tahoma","sans-serif"'>by QC (to achieve the =
same&nbsp;execution plan generated by =
QC).&nbsp;</span><o:p></o:p></p></div><div><p class=3DMsoNormal><span =
style=3D'font-family:"Tahoma","sans-serif"'>To reduce parsing you can =
force it as Sayan&nbsp;has mentioned. Also, check =
support&nbsp;notes/bugs.</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><span style=3D'font-family:"Tahoma","sans-serif"'>Best =
Regards&nbsp;</span><o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Tue, Feb 2, 2021 at 11:12 AM Pap &lt;<a =
href=3D"mailto:oracle.developer35@gmail.com" =
target=3D"_blank">oracle.developer35@gmail.com</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p =
class=3DMsoNormal>Thanks a lot.<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>We will definitely try rerunning by setting session =
level &quot;parallel_force_local&quot; parameter to true as we set this =
value as 'FALSE' in v$parameter.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><i>&quot;parallel slaves will not be able to join the =
execution because they are not able to reproduce the same execution plan =
as the coordinator. &quot;</i><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>I =
am a bit confused with above statement on the dynamic&nbsp;sampling =
part, I see out of three global temporary tables used in this query , =
two of them are using private session level stats as it's gathered =
inside&nbsp;the code. But one(RTNI) is having stats set as NULL and also =
its locked , which means the dynamic sampling must have been triggered =
for that table only. But in that case too, i am not able to understand =
how the dynamic sampling can be the cause, can you please explain bit =
more. As because , my understanding is parsing will happen at the first =
stage and till that time parallel slaves wont get involve in real =
execution. So as the table related info will be available in the node-3 =
as that being the session of the query coordinator/parent session , so =
that should only do the parsing work. Please correct me if =
wrong.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Regards<o:p></o:p></p></div><div><p =
class=3DMsoNormal>Pap<o:p></o:p></p></div></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Tue, Feb 2, 2021 at 11:20 AM Laurentiu Oprea &lt;<a =
href=3D"mailto:laurentiu.oprea06@gmail.com" =
target=3D"_blank">laurentiu.oprea06@gmail.com</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p =
class=3DMsoNormal>Hello,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Additional&nbsp;to what has been mentioned, usually =
this issue is caused&nbsp;by the fact that parallel slaves will not be =
able to join the execution because they are not able to reproduce the =
same execution plan as the =
coordinator.&nbsp;<o:p></o:p></p></div><div><p class=3DMsoNormal>Dynamic =
Sampling is often one of the root causes for this issue, If DS is not =
helping in your case you can create a spl patch for that sql with a =
lower level of DS or even disable it : =
dynamic_sampling(0).<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Good luck<o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>=C3=8En lun., 1 feb. 2021 la 23:53, Sayan Malakshinov =
&lt;<a href=3D"mailto:xt.and.r@gmail.com" =
target=3D"_blank">xt.and.r@gmail.com</a>&gt; a =
scris:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=3DMsoNormal>Hi =
Pap,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Have you tried to =
set&nbsp;parallel_force_local=3Dtrue? Your QC is on Node 3 while your =
slaves are on Node 2:<o:p></o:p></p></div><div><p class=3DMsoNormal>1. =
Parallel queries usually work much better if they don't need to send =
data between nodes and fight for concurrent access to the same =
data;<o:p></o:p></p></div><div><p class=3DMsoNormal>2. You are using =
global temporary tables, so their data is private for your session and =
stored on the same node as your session. In case of parallel access to =
GTT, QC has to send also their segment info, so your slaves have to =
request data from it, ie from Node 3.<o:p></o:p></p></div><div><p =
class=3DMsoNormal>3. Also that means that node 2 have to parse your =
query too for your slaves (sometimes it even leads to more child =
cursors)<o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=3DMsoNormal>On =
Mon, Feb 1, 2021 at 10:28 PM Pap &lt;<a =
href=3D"mailto:oracle.developer35@gmail.com" =
target=3D"_blank">oracle.developer35@gmail.com</a>&gt; =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Hello All, We are seeing some odd =
behaviour. Its version 12.1.0.2.0 of oracle. And a small query(finishing =
in &lt;1 minutes) which is executing in parallel(2) is experiencing =
&quot;library cache lock&quot; and &quot;cursor: pin S wait on X&quot; =
between its own slaves. I mean to say the blocking session is appearing =
as its own slave sessions. We have &quot;parallel_degree_policy&quot; =
set as MANUAL in v$parametr. This query is running for different =
literals one after another multiple times in a loop fashion. And all =
these samples logged in dba_hist_active_sess_history showing IN_PARSE as =
'Y'. Dueto these waits the overall execution time of the process is =
going beyond ~5hrs+. The CPU and IO waits as noted in sql monitor is =
very small. Wondering how parallel slave processes of the same query are =
blocking each other during parsing itself. Or are we hitting any bug in =
this version?<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Attached is the sql and its run time sql =
monitor. And all the tables used in this query are global temporary =
tables &quot;on commit preserve row&quot; types.<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'><o:p>&nbsp;</o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'><o:p>&nbsp;</o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Thanks And Regards<o:p></o:p></span></p><p =
style=3D'mso-margin-top-alt:2.25pt;margin-right:0in;margin-bottom:10.5pt;=
margin-left:0in;vertical-align:baseline;word-break:break-word;line-height=
:inherit;box-sizing:border-box;outline:0px;text-overflow:ellipsis;white-s=
pace:pre-wrap'><span style=3D'font-size:10.5pt;font-family:"Oracle =
Sans","serif";color:#555A62'>Pap<o:p></o:p></span></p></div></blockquote>=
</div><p class=3DMsoNormal><br clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNormal>-- =
<o:p></o:p></p><div><div><div><div><div><p class=3DMsoNormal>Best =
regards,<br>Sayan Malakshinov<o:p></o:p></p></div><p =
class=3DMsoNormal><span style=3D'font-size:10.0pt'>Oracle performance =
tuning engineer</span><o:p></o:p></p><div><p class=3DMsoNormal>Oracle =
ACE Associate<br><a href=3D"http://orasql.org" =
target=3D"_blank">http://orasql.org</a><o:p></o:p></p></div></div></div><=
/div></div></blockquote></div></blockquote></div></blockquote></div><p =
class=3DMsoNormal><br clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNormal>-- =
<o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><div><p =
class=3DMsoNormal><b><span style=3D'font-family:"Trebuchet =
MS","sans-serif";color:black'>Chinar =
Aliyev</span></b><o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal><img border=3D0 id=3D"_x0000_i1025" =
src=3D"https://docs.google.com/uc?export=3Ddownload&amp;id=3D1HYf9FoBNXnn=
wwf-tYZFjAkMCrzg_Yddo&amp;revid=3D0B-QXE3D0UMX1ZFN1d3RhcXZCODhjU3JEVkJsa1=
F2eEp0eDRVPQ"><o:p></o:p></p></div><div><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;color:#212121'>Visit =
My&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<a =
href=3D"http://chinaraliyev.wordpress.com/" =
target=3D"_blank">Blog</a></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Let's =
Connect -</span><a =
href=3D"http://fr.linkedin.com/pub/mohamed-houri/11/329/857/" =
target=3D"_blank"><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1155CC'=
>&nbsp;</span></a><u><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'><a =
href=3D"https://www.linkedin.com/in/chinaraliyev/" =
target=3D"_blank"><span style=3D'color:#1155CC'>Linkedin =
Profile</span></a></span></u><o:p></o:p></p></div><div><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>My&nbsp;<a =
href=3D"https://twitter.com/MohamedHouri" target=3D"_blank"><span =
style=3D'color:windowtext'>Twitter</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; -&nbsp;<a href=3D"https://twitter.com/ChinarAliyev" =
target=3D"_blank"><span =
style=3D'color:#1155CC'>ChinarAliyev</span></a></span><o:p></o:p></p></di=
v><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></div></div></di=
v></div></div></div></div></div></blockquote></div><p =
class=3DMsoNormal><br clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNormal>-- =
<o:p></o:p></p><div><div><div><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Houri =
Mohamed&nbsp;</span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Oracle =
DBA-Developer-Performance &amp; Tuning&nbsp;</span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Visit My =
&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;<a =
href=3D"http://www.hourim.wordpress.com/" =
target=3D"_blank">Blog</a></span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Let's =
Connect -<a =
href=3D"http://fr.linkedin.com/pub/mohamed-houri/11/329/857/" =
target=3D"_blank">&nbsp;</a><u><a =
href=3D"http://fr.linkedin.com/pub/mohamed-houri/11/329/857/" =
target=3D"_blank">Linkedin Profile</a></u></span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>My&nbsp;<a =
href=3D"https://twitter.com/MohamedHouri" target=3D"_blank"><span =
style=3D'color:windowtext'>Twitter</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; -&nbsp;<a href=3D"https://twitter.com/MohamedHouri" =
target=3D"_blank">MohamedHouri</a></span><o:p></o:p></p></div></div></div=
></blockquote></div></blockquote></div></blockquote></div><p =
class=3DMsoNormal><br clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNormal>-- =
<o:p></o:p></p><div><div><div><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Houri =
Mohamed&nbsp;</span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Oracle =
DBA-Developer-Performance &amp; Tuning&nbsp;</span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Visit My =
&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;<a =
href=3D"http://www.hourim.wordpress.com/" =
target=3D"_blank">Blog</a></span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Let's =
Connect -<a =
href=3D"http://fr.linkedin.com/pub/mohamed-houri/11/329/857/" =
target=3D"_blank">&nbsp;</a><u><a =
href=3D"http://fr.linkedin.com/pub/mohamed-houri/11/329/857/" =
target=3D"_blank">Linkedin Profile</a></u></span><o:p></o:p></p><p =
style=3D'margin:0in;margin-bottom:.0001pt'><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>My&nbsp;<a =
href=3D"https://twitter.com/MohamedHouri" target=3D"_blank"><span =
style=3D'color:windowtext'>Twitter</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; -&nbsp;<a href=3D"https://twitter.com/MohamedHouri" =
target=3D"_blank">MohamedHouri</a></span><o:p></o:p></p></div></div></div=
></blockquote></div></div></body></html>
------=_NextPart_000_2DF8_01D6F945.F1435630--




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



