Django 3.2 database improvements #125

Closed
opened 2021-04-08 11:39:18 +02:00 by nik · 9 comments
nik commented 2021-04-08 11:39:18 +02:00 (Migrated from edugit.org)
  • Functional indexes are now supported — we need to check models thatare often queried using a database function (e.g. aggregates), and add functional indexes for those queries (but leave the index out if write performance is more critical than search performance!)
  • Index.include and UniqueConstraint.include are now supported for creating covering indexes — we should check whether we have queries that can be turned into index-only scans that way
  • FilteredRelation now supports nested relations (probably most important for Alsijil)
  • QuerySet.alias can be used instead of QuerySet.annotate for aliases that are only needed for filtering (probably most interesting for Alsijil)
  • Transforms in expressions — not sure
- [x] Functional indexes are now supported — we need to check models thatare often queried using a database function (e.g. aggregates), and add functional indexes for those queries (but leave the index out if write performance is more critical than search performance!) - [x] `Index.include` and `UniqueConstraint.include` are now supported for [creating covering indexes](https://www.postgresql.org/docs/13/indexes-index-only-scans.html) — we should check whether we have queries that can be turned into index-only scans that way - [x] `FilteredRelation` now supports nested relations (probably most important for Alsijil) - [x] `QuerySet.alias` can be used instead of `QuerySet.annotate` for aliases that are only needed for filtering (probably most interesting for Alsijil) - [x] [Transforms in expressions](https://docs.djangoproject.com/en/3.2/topics/db/queries/#using-transforms-in-expressions) — not sure
nik commented 2021-04-08 11:55:04 +02:00 (Migrated from edugit.org)

changed the description

changed the description
nik commented 2021-04-08 16:49:17 +02:00 (Migrated from edugit.org)

marked the checklist item QuerySet.alias can be used instead of QuerySet.annotate for aliases that are only needed for filtering (probably most interesting for Alsijil) as completed

marked the checklist item **`QuerySet.alias` can be used instead of `QuerySet.annotate` for aliases that are only needed for filtering (probably most interesting for Alsijil)** as completed
nik commented 2021-04-08 16:51:54 +02:00 (Migrated from edugit.org)

marked the checklist item Transforms in expressions — not sure as completed

marked the checklist item **[Transforms in expressions](https://docs.djangoproject.com/en/3.2/topics/db/queries/#using-transforms-in-expressions) — not sure** as completed
nik commented 2021-04-08 16:51:59 +02:00 (Migrated from edugit.org)

marked the checklist item FilteredRelation now supports nested relations (probably most important for Alsijil) as completed

marked the checklist item **`FilteredRelation` now supports nested relations (probably most important for Alsijil)** as completed
hansegucker commented 2021-04-08 21:05:18 +02:00 (Migrated from edugit.org)

created merge request !454 to address this issue

created merge request !454 to address this issue
hansegucker commented 2021-04-08 21:05:18 +02:00 (Migrated from edugit.org)

mentioned in merge request !454

mentioned in merge request !454
hansegucker commented 2021-05-15 13:11:16 +02:00 (Migrated from edugit.org)

marked the checklist item Index.include and UniqueConstraint.include are now supported for creating covering indexes — we should check whether we have queries that can be turned into index-only scans that way as completed

marked the checklist item **`Index.include` and `UniqueConstraint.include` are now supported for [creating covering indexes](https://www.postgresql.org/docs/13/indexes-index-only-scans.html) — we should check whether we have queries that can be turned into index-only scans that way** as completed
hansegucker commented 2021-05-15 13:11:17 +02:00 (Migrated from edugit.org)

marked the checklist item Functional indexes are now supported — we need to check models thatare often queried using a database function (e.g. aggregates), and add functional indexes for those queries (but leave the index out if write performance is more critical than search performance!) as completed

marked the checklist item **Functional indexes are now supported — we need to check models thatare often queried using a database function (e.g. aggregates), and add functional indexes for those queries (but leave the index out if write performance is more critical than search performance!)** as completed
nik commented 2021-05-15 16:19:44 +02:00 (Migrated from edugit.org)

mentioned in commit edd54e9030

mentioned in commit edd54e90305d96f0452c5ab846d2e2ca4d9dd49b
nik (Migrated from edugit.org) closed this issue 2021-05-15 16:19:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-App-Chronos#125
No description provided.