explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sBle

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 28.933 ↓ 16.0 16 1

Unique (cost=93.38..93.39 rows=1 width=34) (actual time=28.929..28.933 rows=16 loops=1)

2. 0.008 28.929 ↓ 16.0 16 1

Sort (cost=93.38..93.38 rows=1 width=34) (actual time=28.928..28.929 rows=16 loops=1)

  • Sort Key: taggit_tag.id, taggit_tag.name, taggit_tag.slug, (count(taggit_tag.id))
  • Sort Method: quicksort Memory: 26kB
3. 2.466 28.921 ↓ 16.0 16 1

GroupAggregate (cost=93.35..93.37 rows=1 width=34) (actual time=27.832..28.921 rows=16 loops=1)

  • Group Key: taggit_tag.id
4. 6.806 26.455 ↓ 44,918.0 44,918 1

Sort (cost=93.35..93.35 rows=1 width=26) (actual time=25.198..26.455 rows=44,918 loops=1)

  • Sort Key: taggit_tag.id
  • Sort Method: quicksort Memory: 4,031kB
5. 4.831 19.649 ↓ 44,918.0 44,918 1

Nested Loop (cost=1.70..93.34 rows=1 width=26) (actual time=0.096..19.649 rows=44,918 loops=1)

  • Join Filter: (taggit_taggeditem.content_type_id = django_content_type.id)
  • Rows Removed by Join Filter: 2,124
6. 0.025 0.025 ↑ 1.0 1 1

Seq Scan on django_content_type (cost=0.00..4.92 rows=1 width=4) (actual time=0.013..0.025 rows=1 loops=1)

  • Filter: (((app_label)::text = 'lego'::text) AND ((model)::text = 'moc'::text))
  • Rows Removed by Filter: 194
7. 5.375 14.793 ↓ 534.6 47,042 1

Nested Loop (cost=1.70..87.31 rows=88 width=30) (actual time=0.082..14.793 rows=47,042 loops=1)

8. 0.003 0.106 ↓ 3.2 16 1

Nested Loop (cost=1.28..74.38 rows=5 width=30) (actual time=0.065..0.106 rows=16 loops=1)

9. 0.002 0.071 ↓ 3.2 16 1

Nested Loop (cost=1.00..32.86 rows=5 width=4) (actual time=0.061..0.071 rows=16 loops=1)

10. 0.001 0.044 ↑ 1.0 1 1

Nested Loop (cost=0.58..16.62 rows=1 width=4) (actual time=0.042..0.044 rows=1 loops=1)

11. 0.037 0.037 ↑ 1.0 1 1

Index Only Scan using lego_baseset_pkey on lego_baseset (cost=0.29..8.31 rows=1 width=4) (actual time=0.036..0.037 rows=1 loops=1)

  • Index Cond: (id = 29,864)
  • Heap Fetches: 1
12. 0.006 0.006 ↑ 1.0 1 1

Index Only Scan using lego_moc_pkey on lego_moc (cost=0.29..8.30 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: (baseset_ptr_id = 29,864)
  • Heap Fetches: 1
13. 0.025 0.025 ↓ 3.2 16 1

Index Scan using taggit_taggeditem_af31437c on taggit_taggeditem t4 (cost=0.42..16.19 rows=5 width=8) (actual time=0.018..0.025 rows=16 loops=1)

  • Index Cond: (object_id = 29,864)
  • Filter: (content_type_id = ANY ('{18,63,17,22,20,31,50,180}'::integer[]))
  • Rows Removed by Filter: 1
14. 0.032 0.032 ↑ 1.0 1 16

Index Scan using taggit_tag_pkey on taggit_tag (cost=0.29..8.30 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=16)

  • Index Cond: (id = t4.tag_id)
15. 9.312 9.312 ↓ 50.7 2,940 16

Index Scan using taggit_taggeditem_76f094bc on taggit_taggeditem (cost=0.42..2.01 rows=58 width=8) (actual time=0.005..0.582 rows=2,940 loops=16)

  • Index Cond: (tag_id = taggit_tag.id)
Planning time : 1.513 ms
Execution time : 28.989 ms