explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0QI

Settings
# exclusive inclusive rows x rows loops node
1. 90.197 444.213 ↑ 2.9 96 1

GroupAggregate (cost=1,533,503.72..1,583,212.39 rows=274 width=12) (actual time=254.386..444.213 rows=96 loops=1)

  • Group Key: api_report.rule_id
2. 0.000 354.016 ↑ 2.2 177,550 1

Gather Merge (cost=1,533,503.72..1,581,250.87 rows=391,756 width=20) (actual time=254.328..354.016 rows=177,550 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 57.936 862.767 ↑ 2.8 59,183 3

Merge Join (cost=1,532,503.70..1,535,032.49 rows=163,232 width=20) (actual time=251.359..287.589 rows=59,183 loops=3)

  • Merge Cond: (api_report.rule_id = api_rule.id)
4. 259.839 802.290 ↑ 1.9 91,645 3

Sort (cost=1,532,275.96..1,532,721.74 rows=178,312 width=20) (actual time=250.642..267.430 rows=91,645 loops=3)

  • Sort Key: api_report.rule_id
  • Sort Method: external merge Disk: 2696kB
5. 57.151 542.451 ↑ 1.9 91,645 3

Nested Loop (cost=19.41..1,513,066.04 rows=178,312 width=20) (actual time=0.421..180.817 rows=91,645 loops=3)

6. 118.290 118.290 ↑ 3.4 8,738 3

Parallel Index Scan using api_upload_current_account_index on api_upload (cost=0.56..133,341.24 rows=30,090 width=20) (actual time=0.078..39.430 rows=8,738 loops=3)

  • Index Cond: ((current = true) AND ((account)::text = '729650'::text))
  • Filter: current
7. 366.425 367.010 ↑ 31.6 10 26,215

Index Only Scan using api_report_upload_id_rule_id_1a55a613_uniq on api_report (cost=18.85..42.69 rows=316 width=8) (actual time=0.009..0.014 rows=10 loops=26,215)

  • Index Cond: (upload_id = api_upload.id)
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 1
  • Heap Fetches: 0
8.          

SubPlan (forIndex Only Scan)

9. 0.585 0.585 ↑ 1.0 355 3

Seq Scan on api_ack u0 (cost=0.00..17.39 rows=355 width=4) (actual time=0.016..0.195 rows=355 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 476
10. 1.065 2.541 ↑ 1.0 983 3

Sort (cost=227.73..230.20 rows=985 width=4) (actual time=0.712..0.847 rows=983 loops=3)

  • Sort Key: api_rule.id
  • Sort Method: quicksort Memory: 71kB
11. 1.476 1.476 ↑ 1.0 985 3

Seq Scan on api_rule (cost=0.00..178.76 rows=985 width=4) (actual time=0.018..0.492 rows=985 loops=3)

  • Filter: active
  • Rows Removed by Filter: 91
Planning time : 2.551 ms
Execution time : 445.009 ms