Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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 Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

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.

comment:3 by Jeff Anderson, 13 years ago

Cc: jefferya@… added

comment:4 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [9974069620b0f0e6ac2f1e9bd64819ae0a0e623b]:

Fixed #16882 - Clarified why one should not use 'init_command' after initial database creation.

comment:5 by Tim Graham <timograham@…>, 12 years ago

In [8bea1a7e4eacfe311651eafb506ab1f4e7691feb]:

[1.4.X] Fixed #16882 - Clarified why one should not use 'init_command' after initial database creation.

Backport of 9974069620 from master

Note: See TracTickets for help on using tickets.
Back to Top