﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36593	Deprecate select_related() with no arguments	Adam Johnson	Adam Johnson	"Currently, it’s possible to call `select_related()` with no arguments, [https://docs.djangoproject.com/en/5.2/ref/models/querysets/#django.db.models.query.QuerySet.select_related documented thusly]:

> There may be some situations where you wish to call `select_related()` with a lot of related objects, or where you don’t know all of the relations. In these cases it is possible to call `select_related()` with no arguments. This will follow all non-null foreign keys it can find - nullable foreign keys must be specified. This is not recommended in most cases as it is likely to make the underlying query more complex, and return more data, than is actually needed.


In [https://github.com/django/django/pull/17554#discussion_r2072398386 a comment thread] discussing `select_related()` with no arguments, four contributors agreed it would be worth deprecating, due to its poor performance implications, degrading every time the given model gains a relation.

This deprecation would need to affect both `select_related()` with no arguments and the `ModelAdmin.list_select_related = True` option that uses it."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
