Re: [cx-oracle-users] Python 2: unicode vs str param causing slowness
Brought to you by:
atuining
From: Doug H. <djn...@gm...> - 2015-01-20 17:40:06
|
On 20 January 2015 at 08:55, Dayton Gomez <Day...@sy...> wrote: > > 100 seconds: > cursor.execute('''SELECT COUNT(*) FROM "device" WHERE "PLATFORM" = > :platform''', {'platform': u'ios'}) > > .1 seconds: > cursor.execute('''SELECT COUNT(*) FROM "device" WHERE "PLATFORM" = > :platform''', {'platform': 'ios'}) This sounds similar to problems where the indexed column is implicitly type converted to match the bind variable's type. To test this, in 11g, if possible, rewrite the query as: cursor.execute('''SELECT COUNT(*) FROM "device" WHERE :platform = "PLATFORM"''', {'platform': u'ios'}) Doug -- Doug Henderson, Calgary, Alberta, Canada |