Re: [cx-oracle-users] Performance of objects
Brought to you by:
atuining
From: Walter <wa...@li...> - 2017-09-05 14:31:43
|
On 4 Sep 2017, at 23:21, Anthony Tuininga wrote: > On Wed, Aug 30, 2017 at 3:40 AM, Walter Dörwald > <wa...@li...> > 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 >>> version >>> specific? >> >> I retried on Linux with the same database: >> >> In [1] ▸ import cx_Oracle >> In [2] ▸ cx_Oracle.clientversion() >> Out[3] ▸ (11, 2, 0, 2, 0) >> In [4] ▸ cx_Oracle.version >> Out[4] ▸ '6.0.1' >> In [5] ▸ db = cx_Oracle.connect("user/pwd@db") >> In [6] ▸ db.version >> Out[6] ▸ '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 = 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. > Anthony Servus, Walter |