diff options
| author | Matt Boersma <matt@sprout.org> | 2007-12-21 18:49:07 +0000 |
|---|---|---|
| committer | Matt Boersma <matt@sprout.org> | 2007-12-21 18:49:07 +0000 |
| commit | c5d3a925c7285df4133cdb028f3a4bf44fd01e59 (patch) | |
| tree | 74060c8bbfbaf9d10ed6a35e825921fc3bdb4e93 | |
| parent | 0a348bb2692ce793cf28c50643bcf484d63e8560 (diff) | |
Set Oracle stmtcachesize to 20 instead of 0 for a performance boost.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/oracle/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index e7a5b9d1a6..5dd62432c5 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -432,6 +432,12 @@ class DatabaseWrapper(BaseDatabaseWrapper): 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. |
