explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kkt7

Settings
# exclusive inclusive rows x rows loops node
1. 0.832 53.264 ↓ 42.4 424 1

GroupAggregate (cost=16,541.50..16,541.73 rows=10 width=16) (actual time=52.129..53.264 rows=424 loops=1)

  • Group Key: label_links.label_id, (date(issues.created_at))
2. 2.065 52.432 ↓ 328.1 3,281 1

Sort (cost=16,541.50..16,541.53 rows=10 width=12) (actual time=52.118..52.432 rows=3,281 loops=1)

  • Sort Key: label_links.label_id, (date(issues.created_at))
  • Sort Method: quicksort Memory: 250kB
3. 2.884 50.367 ↓ 328.1 3,281 1

Nested Loop (cost=1.12..16,541.34 rows=10 width=12) (actual time=0.049..50.367 rows=3,281 loops=1)

4. 4.055 4.055 ↓ 1.1 3,948 1

Index Only Scan using index_issues_on_project_id_and_created_at_and_id_and_state on issues (cost=0.56..169.20 rows=3,685 width=12) (actual time=0.025..4.055 rows=3,948 loops=1)

  • Index Cond: ((project_id = 278964) AND (created_at <= '2019-08-01 00:00:00+00'::timestamp with time zone) AND (created_at >= '2019-05-01 00:00:00+00'::timestamp with time zone))
  • Heap Fetches: 516
5. 43.428 43.428 ↑ 1.0 1 3,948

Index Scan using index_label_links_on_target_id_and_target_type on label_links (cost=0.56..4.43 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=3,948)

  • Index Cond: ((target_id = issues.id) AND ((target_type)::text = 'Issue'::text))
  • Filter: (label_id = ANY ('{2731248,10230929,4116705,2492649,2278648,2779806}'::integer[]))
  • Rows Removed by Filter: 6
Planning time : 0.795 ms
Execution time : 53.341 ms