explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lKaK

Settings
# exclusive inclusive rows x rows loops node
1. 0.560 18,804.039 ↑ 5,479.6 50 1

Finalize GroupAggregate (cost=1,372,840.79..1,428,482.74 rows=273,980 width=2,651) (actual time=17,219.004..18,804.039 rows=50 loops=1)

  • Group Key: gigreport_report.id, gigstore_project.id
  • Filter: ((((gigreport_report.status)::text = 'in_progress'::text) AND ((gigreport_report.export_status)::text = 'pending'::text) AND ((count(gigreport_reportresult.id) FILTER (WHERE ((gigreport_reportresult.status)::text = ANY ('{fai
  • Rows Removed by Filter: 163
2. 0.000 18,803.479 ↑ 1,286.3 213 1

Gather Merge (cost=1,372,840.79..1,417,523.54 rows=273,980 width=2,643) (actual time=16,423.257..18,803.479 rows=213 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 1,576.508 33,137.848 ↑ 2,584.7 106 2

Partial GroupAggregate (cost=1,371,840.78..1,385,700.78 rows=273,980 width=2,643) (actual time=14,428.153..16,568.924 rows=106 loops=2)

  • Group Key: gigreport_report.id, gigstore_project.id
4. 24,010.528 31,561.340 ↓ 3.0 2,249,834 2

Sort (cost=1,371,840.78..1,373,694.14 rows=741,347 width=2,640) (actual time=14,414.693..15,780.670 rows=2,249,834 loops=2)

  • Sort Key: gigreport_report.id, gigstore_project.id
  • Sort Method: external merge Disk: 3285512kB
5. 1,529.882 7,550.812 ↓ 3.0 2,249,834 2

Nested Loop Left Join (cost=0.84..311,119.92 rows=741,347 width=2,640) (actual time=0.230..3,775.406 rows=2,249,834 loops=2)

6. 0.934 8.792 ↑ 1.1 106 2

Nested Loop (cost=0.28..1,505.81 rows=121 width=2,627) (actual time=0.096..4.396 rows=106 loops=2)

7. 5.728 5.728 ↑ 1.1 106 2

Parallel Seq Scan on gigreport_report (cost=0.00..1,388.70 rows=121 width=1,317) (actual time=0.049..2.864 rows=106 loops=2)

  • Filter: ((export_status)::text = 'pending'::text)
  • Rows Removed by Filter: 1576
8. 2.130 2.130 ↑ 1.0 1 213

Index Scan using gigstore_project_pkey on gigstore_project (cost=0.28..0.97 rows=1 width=1,310) (actual time=0.010..0.010 rows=1 loops=213)

  • Index Cond: (id = gigreport_report.project_id)
9. 6,012.138 6,012.138 ↓ 1.1 21,125 213

Index Scan using gigreport_reportresult_report_id_5a16c9a2 on gigreport_reportresult (cost=0.56..2,359.08 rows=19,971 width=17) (actual time=0.025..28.226 rows=21,125 loops=213)

  • Index Cond: (gigreport_report.id = report_id)
Planning time : 2.282 ms
Execution time : 19,370.928 ms