summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorVojtech Bocek <vojtech.bocek@avast.com>2019-07-29 16:40:27 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-09-09 14:04:46 +0200
commitb1d37fea8fd7904c2b2d11c91393cf1b989314b6 (patch)
tree09fcbf33ded256df5cb2d82c85e513be5c81c365 /docs
parent10d5e439e92da3881f5c32151f3a89f264c9cfd8 (diff)
Fixed #28107 -- Added DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/3.0.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt
index 9891119e66..5d7ab98851 100644
--- a/docs/releases/3.0.txt
+++ b/docs/releases/3.0.txt
@@ -355,6 +355,17 @@ Models
* :class:`~django.db.models.CheckConstraint` is now supported on MySQL 8.0.16+.
+* The new ``allows_group_by_selected_pks_on_model()`` method of
+ ``django.db.backends.base.BaseDatabaseFeatures`` allows optimization of
+ ``GROUP BY`` clauses to require only the selected models' primary keys. By
+ default, it's supported only for managed models on PostgreSQL.
+
+ To enable the ``GROUP BY`` primary key-only optimization for unmanaged
+ models, you have to subclass the PostgreSQL database engine, overriding the
+ features class ``allows_group_by_selected_pks_on_model()`` method as you
+ require. See :ref:`Subclassing the built-in database backends
+ <subclassing-database-backends>` for an example.
+
Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~