#16882 closed Cleanup/optimization (fixed)
Clarify in the doc why one should not use 'init_command' after initial database creation
Reported by: | Julien Phalip | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | jefferya@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In [1]
, the doc says in regards to the 'init_command' DATABASES settting's option, "After your tables have been created, you should remove this option", presumably for performance reasons. These reasons should be clarified.
[1]
https://docs.djangoproject.com/en/dev/ref/databases/#creating-your-tables
Change History (5)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 13 years ago
Cc: | added |
---|
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I think it's for performance reasons too.
Django opens a connection to the database for each request, so keeping this option will add one SQL query per HTTP request, which isn't negligible even if the query is fast.