Skip to content

Commit

Permalink
Set Oracle stmtcachesize to 20 instead of 0 for a performance boost.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
mboersma committed Dec 21, 2007
1 parent 0a348bb commit c5d3a92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions django/db/backends/oracle/base.py
Expand Up @@ -432,6 +432,12 @@ def _cursor(self, settings):
self.oracle_version = int(self.connection.version.split('.')[0])
except ValueError:
pass
try:
self.connection.stmtcachesize = 20
except:
# Django docs specify cx_Oracle version 4.3.1 or higher, but
# stmtcachesize is available only in 4.3.2 and up.
pass
if not cursor:
cursor = FormatStylePlaceholderCursor(self.connection)
# Default arraysize of 1 is highly sub-optimal.
Expand Down

0 comments on commit c5d3a92

Please sign in to comment.