explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CHdPe

Settings
# exclusive inclusive rows x rows loops node
1. 1.027 18,645.732 ↑ 1.0 1 1

Aggregate (cost=272,478.59..272,478.60 rows=1 width=8) (actual time=18,645.732..18,645.732 rows=1 loops=1)

2. 10.291 18,644.705 ↓ 3.1 17,962 1

Sort (cost=272,391.08..272,405.67 rows=5,834 width=16) (actual time=18,642.657..18,644.705 rows=17,962 loops=1)

  • Sort Key: api_upload.system_uuid
  • Sort Method: quicksort Memory: 1610kB
3. 2.059 18,634.414 ↓ 3.1 17,962 1

Nested Loop (cost=11,181.56..272,026.16 rows=5,834 width=16) (actual time=54.049..18,634.414 rows=17,962 loops=1)

4. 0.010 0.010 ↑ 1.0 1 1

Index Scan using api_rule_pkey on api_rule (cost=0.28..8.29 rows=1 width=4) (actual time=0.007..0.010 rows=1 loops=1)

  • Index Cond: (id = 1101)
  • Filter: active
5. 15.920 18,632.345 ↓ 3.1 17,962 1

Gather (cost=11,181.28..271,959.52 rows=5,834 width=20) (actual time=54.040..18,632.345 rows=17,962 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 192.670 18,616.425 ↓ 2.5 5,987 3

Merge Join (cost=10,181.28..270,376.12 rows=2,431 width=20) (actual time=101.177..18,616.425 rows=5,987 loops=3)

  • Merge Cond: (api_report.upload_id = api_upload.id)
7. 18,387.704 18,389.011 ↓ 1.7 2,810,062 3

Parallel Index Only Scan using api_report_rule_id_1892e1_idx on api_report (cost=22.00..255,605.22 rows=1,693,065 width=8) (actual time=3.163..18,389.011 rows=2,810,062 loops=3)

  • Index Cond: (rule_id = 1101)
  • Filter: (NOT (hashed SubPlan 1))
  • Heap Fetches: 14875
8.          

SubPlan (for Parallel Index Only Scan)

9. 1.307 1.307 ↑ 1.0 351 3

Seq Scan on api_ack u2 (cost=0.00..20.55 rows=351 width=4) (actual time=0.008..1.307 rows=351 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 573
10. 16.272 34.744 ↑ 3.2 23,086 3

Sort (cost=10,159.27..10,346.80 rows=75,013 width=20) (actual time=30.096..34.744 rows=23,086 loops=3)

  • Sort Key: api_upload.id
  • Sort Method: quicksort Memory: 2575kB
11. 18.472 18.472 ↑ 3.2 23,119 3

Index Only Scan using api_upload_account_system_uuid_source_id_id_index on api_upload (cost=0.42..4,085.15 rows=75,013 width=20) (actual time=0.032..18.472 rows=23,119 loops=3)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 1406
Planning time : 1.970 ms
Execution time : 18,646.154 ms