mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[3.1.x] Fixed example of QuerySet.explain() with flags in docs.
Backport of 054ab1e00f from master
This commit is contained in:
committed by
Mariusz Felisiak
parent
fbb7881956
commit
562a4824d7
@@ -2640,7 +2640,7 @@ PostgreSQL's ``'TEXT'`` output and is used by default, if supported.
|
||||
Some databases accept flags that can return more information about the query.
|
||||
Pass these flags as keyword arguments. For example, when using PostgreSQL::
|
||||
|
||||
>>> print(Blog.objects.filter(title='My Blog').explain(verbose=True))
|
||||
>>> print(Blog.objects.filter(title='My Blog').explain(verbose=True, analyze=True))
|
||||
Seq Scan on public.blog (cost=0.00..35.50 rows=10 width=12) (actual time=0.004..0.004 rows=10 loops=1)
|
||||
Output: id, title
|
||||
Filter: (blog.title = 'My Blog'::bpchar)
|
||||
|
||||
Reference in New Issue
Block a user