... the initial QuerySet . This copying is also done in related managers, even though fetch modes don't affect such managers' queries. Available modes ¶ Referencing fetch modes Fetch modes are defined in django.db.models.fetch_modes , but for convenience t ... current instance only. This is the default mode. Using FETCH_ONE for the above example would use: 1 query to fetch books N queries, where N is the number of books, to fetch the missing author field …for a total of 1+N queries. This query pattern is know ... n as the "N+1 queries problem" because it often leads to performance issues when N is large. FETCH_PEERS ¶ Fetches the missing field for the cur ... ... the initial QuerySet . This copying is also done in related managers, even though fetch modes don't affect such managers' queries. Available modes ¶ Referencing fetch modes Fetch modes are defined in django.db.models.fetch_modes , but for convenience t ... current instance only. This is the default mode. Using FETCH_ONE for the above example would use: 1 query to fetch books N queries, where N is the number of books, to fetch the missing author field …for a total of 1+N queries. This query pattern is know ... n as the "N+1 queries problem" because it often leads to performance issues when N is large. FETCH_PEERS ¶ Fetches the missing field for the cur ... ... 。次に、以下のコードを実行してください。 >>> from django.db import connection >>> connection . queries [{'sql': 'SELECT polls_polls.id, polls_polls.question, polls_polls.pub_date FROM polls_polls', 'time': '0.002'}] connectio ... n.queries は DEBUG が True の場合にのみ利用できます。これはクエリの実行順に辞書を並べたリストです。各辞書には以下の項目が入っています ... : sql - 素のSQL構文 time - ステートメントの実行に要した秒数。 connection.queries にはINSERT, UPDATE, SELECTなどの全てのSQL文が記録されています。アプリケーションがデータベースを操作するたびに、クエリが記録 ... ... 。次に、以下のコードを実行してください。 >>> from django.db import connection >>> connection . queries [{'sql': 'SELECT polls_polls.id, polls_polls.question, polls_polls.pub_date FROM polls_polls', 'time': '0.002'}] connectio ... n.queries は DEBUG が True の場合にのみ利用できます。これはクエリの実行順に辞書を並べたリストです。各辞書には以下の項目が入っています ... : sql - 素のSQL構文 time - ステートメントの実行に要した秒数。 connection.queries にはINSERT, UPDATE, SELECTなどの全てのSQL文が記録されています。アプリケーションがデータベースを操作するたびに、クエリが記録 ... ... ust ( #24704 ). Fixed AssertionError in some delete queries with a model containing a field that is both a foreign and primary key ( #24951 ). Fixed AssertionError in some complex qu ... ). Fixed migrations crash on MySQL when adding a text or a blob field with an unhashable default ( #25393 ). Changed Count queries to execute COUNT(*) instead of COUNT('*') as versions of Django before 1.8 did ( #25377 ). This may fix a performance regr ... mmit with set_autocommit(False) ( #24921 ). Fixed the manage.py test --keepdb option on Oracle ( #25421 ). Fixed incorrect queries with multiple many-to-many fields on a model with the same 'to' model and with related_name set to '+' ( #24505 , #25486 ) ... ... ust ( #24704 ). Fixed AssertionError in some delete queries with a model containing a field that is both a foreign and primary key ( #24951 ). Fixed AssertionError in some complex qu ... ). Fixed migrations crash on MySQL when adding a text or a blob field with an unhashable default ( #25393 ). Changed Count queries to execute COUNT(*) instead of COUNT('*') as versions of Django before 1.8 did ( #25377 ). This may fix a performance regr ... mmit with set_autocommit(False) ( #24921 ). Fixed the manage.py test --keepdb option on Oracle ( #25421 ). Fixed incorrect queries with multiple many-to-many fields on a model with the same 'to' model and with related_name set to '+' ( #24505 , #25486 ) ... ... d ( #31941 ). Fixed a regression in Django 3.1 where the QuerySet.ordered attribute returned incorrectly True for GROUP BY queries (e.g. .annotate().values() ) on models with Meta.ordering . A model's Meta.ordering doesn't affect such queries ( #31990 ) ... トピックへ Django 3.1.3 リリースノート 次のトピックへ Django 3.1.1 リリースノート 関連キーワード Fixed regression バグ 修正 queries Meta ordering crash database using admin リリースノート October FileField instances callable storage were correctly decons ... ... same language was added in Django 2.2.12. Features deprecated in 2.2 ¶ Model Meta.ordering will no longer affect GROUP BY queries ¶ A model's Meta.ordering affecting GROUP BY queries (such as .annotate().values() ) is a common source of confusion. Such ... queries now issue a deprecation warning with the advice to add an order_by() to retain the current query. Meta.ordering will be ig ... nored in such queries starting in Django 3.1. その他 ¶ django.utils.timezone.FixedOffset is deprecated in favor of datetime.timezone . The undoc ... ... same language was added in Django 2.2.12. Features deprecated in 2.2 ¶ Model Meta.ordering will no longer affect GROUP BY queries ¶ A model's Meta.ordering affecting GROUP BY queries (such as .annotate().values() ) is a common source of confusion. Such ... queries now issue a deprecation warning with the advice to add an order_by() to retain the current query. Meta.ordering will be ig ... nored in such queries starting in Django 3.1. その他 ¶ django.utils.timezone.FixedOffset is deprecated in favor of datetime.timezone . The undoc ... ... onding models were not locked ( #31246 ). Fixed a regression in Django 3.0 that caused misplacing parameters in logged SQL queries on Oracle ( #31271 ). Fixed a regression in Django 3.0.3 that caused misplacing parameters of SQL queries when subtracting ... DateField or DateTimeField expressions on MySQL ( #31312 ). Fixed a regression in Django 3.0 that didn't include subqueries spanning multivalued relations in the GROUP BY clause ( #31150 ). 目次 Django 3.0.4 リリースノート CVE-2020-9402: Potentia ... ession Oracle caused バグ 修正 injection tolerance functions aggregates were loss possibility fields misplacing parameters queries リリースノート March セキュリティ 問題 Potential parameter subject クイック検索 Last update: 2026年10月09日 « previous | u ... 2026年10月08日