Opened 13 years ago
Last modified 13 years ago
#16478 closed Cleanup/optimization
Document Oracle-specific database settings, esp. for tests. — at Version 4
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | oracle |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
EDIT: a few days after reporting this ticket, I changed my recommendation. See comments 2 and 3 below. I'm updating the title to reflect this.
Original title: Don't hardcode the location of Oracle's datafiles for the test tablespaces
Use case: I want to move Oracle's datafiles to a RAM disk (tmpfs) to speed up the execution of Django's test suite.
Problem: django.db.backends.oracle.creation
currently uses this SQL: CREATE TABLESPACE %(tblspace)s DATAFILE '%(tblspace)s.dbf' ...
It's allright to provide a datafile name, because we can't assume all users of Django are using Oracle-managed files. However, since we provide a relative path, the file will always be created in Oracle's dbs
directory. The DB_CREATE_FILE_DEST
parameter is ignored when a datafile name is provided.
See http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/clauses004.htm#i1030551 (if you speak Oraclese).
Proposed solution: add an optional setting to control the location of the datafile during the tests. If the setting is not provided, default to TEST_TBLSPACE + '.dbf'
for backwards compatibility.
Change History (7)
by , 13 years ago
Attachment: | 16478.diff added |
---|
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | Screen shot 2011-07-17 at 11.38.28.png added |
---|
comment:2 by , 13 years ago
Upon further investigation, there are undocumented TEST_CREATE
and TEST_USER_CREATE
boolean parameters.
The best solution may be to set TEST_CREATE = False
and create the tablespace with whatever parameters I want.
comment:3 by , 13 years ago
Here is a new patch that documents the undocumented Oracle-specific settings. I'm now using this, and I'm creating and dropping the user and the tablespaces with a separate SQL script.
by , 13 years ago
Attachment: | 16478-docs-only.patch added |
---|
comment:4 by , 13 years ago
Description: | modified (diff) |
---|---|
Summary: | Don't hardcode the location of Oracle's datafiles for the test tablespaces → Document Oracle-specific database settings, esp. for tests. |
NB: during the test suite, each tablespace takes 160MB (see attached screenshot). This is a good reason to move it to RAM.