explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bxRM

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 1,154.814 ↑ 1.0 10 1

Limit (cost=54,118.09..54,118.11 rows=10 width=12) (actual time=1,154.809..1,154.814 rows=10 loops=1)

2. 0.087 1,154.808 ↑ 22.2 10 1

Sort (cost=54,118.09..54,118.64 rows=222 width=12) (actual time=1,154.808..1,154.808 rows=10 loops=1)

  • Sort Key: (count(label_links.id)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 5.131 1,154.721 ↓ 2.9 641 1

GroupAggregate (cost=54,109.40..54,113.29 rows=222 width=12) (actual time=1,146.350..1,154.721 rows=641 loops=1)

  • Group Key: labels.id
4. 12.438 1,149.590 ↓ 186.7 41,447 1

Sort (cost=54,109.40..54,109.96 rows=222 width=8) (actual time=1,146.247..1,149.590 rows=41,447 loops=1)

  • Sort Key: labels.id
  • Sort Method: quicksort Memory: 3479kB
5. 6.520 1,137.152 ↓ 186.7 41,447 1

Nested Loop (cost=1.00..54,100.75 rows=222 width=8) (actual time=0.044..1,137.152 rows=41,447 loops=1)

6. 1.944 1.944 ↓ 1.1 968 1

Index Scan using index_labels_on_group_id_and_project_id_and_title on labels (cost=0.56..1,200.25 rows=916 width=4) (actual time=0.020..1.944 rows=968 loops=1)

  • Index Cond: (group_id = 9970)
7. 1,128.688 1,128.688 ↓ 4.8 43 968

Index Scan using index_label_links_on_label_id on label_links (cost=0.44..57.66 rows=9 width=8) (actual time=0.096..1.166 rows=43 loops=968)

  • Index Cond: (label_id = labels.id)
  • Filter: ((created_at > '2019-12-01 00:00:00'::timestamp without time zone) AND (created_at < '2020-02-10 00:00:00'::timestamp without time zone) AND ((target_type)::text = 'Issue'::text))
  • Rows Removed by Filter: 667
Planning time : 0.458 ms
Execution time : 1,154.868 ms