Re: Performance of objects

Anthony Tuininga <[email protected]> Tue, 5 Sep 2017 09:28:32 -0600
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAE1XR-6UbfiajtL17Hu+7vNx_ZmLwraY-Atn_1iKf7+C+R1HNA@mail.gmail.com>
--===============6676407681417698112==
Content-Type: multipart/alternative; boundary="001a11449f2652307a055872e199"

--001a11449f2652307a055872e199
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 5, 2017 at 8:31 AM, Walter D=C3=B6rwald <[email protected]>
wrote:

> On 4 Sep 2017, at 23:21, Anthony Tuininga wrote:
>
> On Wed, Aug 30, 2017 at 3:40 AM, Walter D=C3=B6rwald <walter@livinglogic.=
de>
>> wrote:
>>
>> On 30 Aug 2017, at 1:09, Anthony Tuininga wrote:
>>>
>>> Hi Walter,
>>>>
>>>> I just tried this on Linux with 12.2 Client and Database. I got these
>>>> results:
>>>>
>>>> table 1.1217586994171143
>>>> object 0.8592920303344727
>>>>
>>>> When I change the number of iterations from 1300 to 1200 I get this:
>>>>
>>>> table 0.996464729309082
>>>> object 0.747194766998291
>>>>
>>>> So it seems consistent. Are you able to try with a different
>>>> database/client scenario to see if the issues you are seeing are versi=
on
>>>> specific?
>>>>
>>>
>>> I retried on Linux with the same database:
>>>
>>> In [1] =E2=96=B8 import cx_Oracle
>>> In [2] =E2=96=B8 cx_Oracle.clientversion()
>>> Out[3] =E2=96=B8 (11, 2, 0, 2, 0)
>>> In [4] =E2=96=B8 cx_Oracle.version
>>> Out[4] =E2=96=B8 '6.0.1'
>>> In [5] =E2=96=B8 db =3D cx_Oracle.connect("user/pwd@db")
>>> In [6] =E2=96=B8 db.version
>>> Out[6] =E2=96=B8 '11.2.0.1.0'
>>>
>>> With 1200 iterations I get:
>>>
>>> table 0.3604605197906494
>>> object 0.8905477523803711
>>> equal True
>>>
>>> With 1300 iterations I get:
>>>
>>> table 0.3804595470428467
>>> object 42.898988246917725
>>> equal True
>>>
>>> The strange thing is that
>>>
>>>    c.execute("select test_events2 from dual")
>>>
>>> takes 0.2 seconds and
>>>
>>>    objs =3D c.fetchone()[0].aslist()
>>>
>>> takes 0.1 seconds, but accessing the attributes takes 42 seconds.
>>>
>>> I also tried the script on Linux against a 12.1.0.2.0 database. The
>>> output:
>>>
>>> table 0.5058784484863281
>>> object select 0.20530128479003906
>>> object fetch 0.10213565826416016
>>> object convert 110.43995141983032
>>> object 110.74747037887573
>>> equal True
>>>
>>> So maybe this problem is specific to the client version?
>>>
>>> Or it happens on all versions, but the threshold is higher?
>>>
>>>
>> I just tried with 11.2 client and I get similar responses to yours.
>>
>> 1200:
>> table 0.9072585105895996
>> object 0.710052490234375
>>
>> 1300:
>> table 1.0106935501098633
>> object 116.8638014793396
>>
>> With 12.1 client I also get similar numbers:
>>
>> 1200:
>> table 0.9160842895507812
>> object 0.7757439613342285
>>
>> 1300:
>> table 1.0204412937164307
>> object 118.60206842422485
>>
>> So apparently, this was a performance issue resolved in 12.2 client. If
>> you
>> can upgrade, do it!
>>
>
> I'd like to, but
>
>    http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
>
> doesn't list any 12.2 version for the Mac.
>

Ah yes, that is a problem. :-( Hopefully that will get resolved soon!


>
> Anthony
>>
>
> Servus,
>    Walter
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> cx-oracle-users mailing list
> cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>

--001a11449f2652307a055872e199
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Sep 5, 2017 at 8:31 AM, Walter D=C3=B6rwald <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=3D"HOEn=
Zb"><div class=3D"h5">On 4 Sep 2017, at 23:21, Anthony Tuininga wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On Wed, Aug 30, 2017 at 3:40 AM, Walter D=C3=B6rwald &lt;<a href=3D"mailto:=
[email protected]" target=3D"_blank">[email protected]</a>&gt;<br>
wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On 30 Aug 2017, at 1:09, Anthony Tuininga wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hi Walter,<br>
<br>
I just tried this on Linux with 12.2 Client and Database. I got these<br>
results:<br>
<br>
table 1.1217586994171143<br>
object 0.8592920303344727<br>
<br>
When I change the number of iterations from 1300 to 1200 I get this:<br>
<br>
table 0.996464729309082<br>
object 0.747194766998291<br>
<br>
So it seems consistent. Are you able to try with a different<br>
database/client scenario to see if the issues you are seeing are version<br=
>
specific?<br>
</blockquote>
<br>
I retried on Linux with the same database:<br>
<br>
In [1] =E2=96=B8 import cx_Oracle<br>
In [2] =E2=96=B8 cx_Oracle.clientversion()<br>
Out[3] =E2=96=B8 (11, 2, 0, 2, 0)<br>
In [4] =E2=96=B8 cx_Oracle.version<br>
Out[4] =E2=96=B8 &#39;6.0.1&#39;<br>
In [5] =E2=96=B8 db =3D cx_Oracle.connect(&quot;user/pwd@db<wbr>&quot;)<br>
In [6] =E2=96=B8 db.version<br>
Out[6] =E2=96=B8 &#39;11.2.0.1.0&#39;<br>
<br>
With 1200 iterations I get:<br>
<br>
table 0.3604605197906494<br>
object 0.8905477523803711<br>
equal True<br>
<br>
With 1300 iterations I get:<br>
<br>
table 0.3804595470428467<br>
object 42.898988246917725<br>
equal True<br>
<br>
The strange thing is that<br>
<br>
=C2=A0 =C2=A0c.execute(&quot;select test_events2 from dual&quot;)<br>
<br>
takes 0.2 seconds and<br>
<br>
=C2=A0 =C2=A0objs =3D c.fetchone()[0].aslist()<br>
<br>
takes 0.1 seconds, but accessing the attributes takes 42 seconds.<br>
<br>
I also tried the script on Linux against a 12.1.0.2.0 database. The output:=
<br>
<br>
table 0.5058784484863281<br>
object select 0.20530128479003906<br>
object fetch 0.10213565826416016<br>
object convert 110.43995141983032<br>
object 110.74747037887573<br>
equal True<br>
<br>
So maybe this problem is specific to the client version?<br>
<br>
Or it happens on all versions, but the threshold is higher?<br>
<br>
</blockquote>
<br>
I just tried with 11.2 client and I get similar responses to yours.<br>
<br>
1200:<br>
table 0.9072585105895996<br>
object 0.710052490234375<br>
<br>
1300:<br>
table 1.0106935501098633<br>
object 116.8638014793396<br>
<br>
With 12.1 client I also get similar numbers:<br>
<br>
1200:<br>
table 0.9160842895507812<br>
object 0.7757439613342285<br>
<br>
1300:<br>
table 1.0204412937164307<br>
object 118.60206842422485<br>
<br>
So apparently, this was a performance issue resolved in 12.2 client. If you=
<br>
can upgrade, do it!<br>
</blockquote>
<br></div></div>
I&#39;d like to, but<br>
<br>
=C2=A0 =C2=A0<a href=3D"http://www.oracle.com/technetwork/topics/intel-macs=
oft-096467.html" rel=3D"noreferrer" target=3D"_blank">http://www.oracle.com=
/technet<wbr>work/topics/intel-macsoft-<wbr>096467.html</a><br>
<br>
doesn&#39;t list any 12.2 version for the Mac.<br></blockquote><div><br></d=
iv><div>Ah yes, that is a problem. :-( Hopefully that will get resolved soo=
n!</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Anthony<br>
</blockquote><div class=3D"HOEnZb"><div class=3D"h5">
<br>
Servus,<br>
=C2=A0 =C2=A0Walter<br>
<br>
------------------------------<wbr>------------------------------<wbr>-----=
-------------<br>
Check out the vibrant tech community on one of the world&#39;s most<br>
engaging tech sites, Slashdot.org! <a href=3D"http://sdm.link/slashdot" rel=
=3D"noreferrer" target=3D"_blank">http://sdm.link/slashdot</a><br>
______________________________<wbr>_________________<br>
cx-oracle-users mailing list<br>
<a href=3D"mailto:cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" target=3D"_blank">=
[email protected]<wbr>rge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/cx-oracle-users" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/<wbr>lists=
/listinfo/cx-oracle-users</a><br>
</div></div></blockquote></div><br></div></div>

--001a11449f2652307a055872e199--


--===============6676407681417698112==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============6676407681417698112==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users

--===============6676407681417698112==--