Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
c8d61fa1
Kaydet (Commit)
c8d61fa1
authored
Şub 23, 2014
tarafından
Alex de Landgraaf
Kaydeden (comit)
Tim Graham
Mar 03, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21986 -- Added some guidelines for database indexes.
Thanks django-issues at colons.co for the suggestion.
üst
5a4f1298
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
optimization.txt
docs/topics/db/optimization.txt
+11
-3
No files found.
docs/topics/db/optimization.txt
Dosyayı görüntüle @
c8d61fa1
...
@@ -36,11 +36,19 @@ Use standard DB optimization techniques
...
@@ -36,11 +36,19 @@ Use standard DB optimization techniques
...including:
...including:
* Indexes. This is a number one priority, *after* you have determined from
* Indexes
_
. This is a number one priority, *after* you have determined from
profiling what indexes should be added. Use
profiling what indexes should be added. Use
:attr:`
django.db.models.Field.db_index
` or
:attr:`
Field.db_index <django.db.models.Field.db_index>
` or
:attr:`Meta.index_together <django.db.models.Options.index_together>` to add
:attr:`Meta.index_together <django.db.models.Options.index_together>` to add
these from Django.
these from Django. Consider adding indexes to fields that you frequently
query using :meth:`~django.db.models.query.QuerySet.filter()`,
:meth:`~django.db.models.query.QuerySet.exclude()`,
:meth:`~django.db.models.query.QuerySet.order_by()`, etc. as indexes may help
to speed up lookups. Note that determining the best indexes is a complex
database-dependent topic that will depend on your particular application.
The overhead of maintaining an index may outweigh any gains in query speed.
.. _Indexes: http://en.wikipedia.org/wiki/Database_index
* Appropriate use of field types.
* Appropriate use of field types.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment