explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lnlm

Settings
# exclusive inclusive rows x rows loops node
1. 2.002 2,536.144 ↑ 1.0 1 1

Aggregate (cost=513,545.81..513,545.82 rows=1 width=8) (actual time=2,536.144..2,536.144 rows=1 loops=1)

2. 0.644 2,534.142 ↓ 3.0 17,967 1

Nested Loop (cost=11,531.71..513,530.61 rows=6,082 width=0) (actual time=80.752..2,534.142 rows=17,967 loops=1)

3. 0.007 0.007 ↑ 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.006..0.007 rows=1 loops=1)

  • Index Cond: (id = 1101)
  • Filter: active
4. 8.778 2,533.491 ↓ 3.0 17,967 1

Gather (cost=11,531.43..513,461.49 rows=6,082 width=4) (actual time=80.745..2,533.491 rows=17,967 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 445.229 2,524.713 ↓ 2.4 5,989 3

Merge Join (cost=10,531.43..511,853.29 rows=2,534 width=4) (actual time=50.617..2,524.713 rows=5,989 loops=3)

  • Merge Cond: (api_report.upload_id = api_upload.id)
6. 2,040.277 2,040.450 ↓ 1.7 2,953,389 3

Parallel Index Only Scan using api_report_rule_id_1892e1_idx on api_report (cost=22.00..496,899.50 rows=1,755,704 width=8) (actual time=0.290..2,040.450 rows=2,953,389 loops=3)

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

SubPlan (forParallel Index Only Scan)

8. 0.173 0.173 ↑ 1.0 351 3

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 573
9. 18.907 39.034 ↑ 3.3 22,910 3

Sort (cost=10,508.90..10,700.34 rows=76,579 width=4) (actual time=32.519..39.034 rows=22,910 loops=3)

  • Sort Key: api_upload.id
  • Sort Method: quicksort Memory: 1855kB
10. 20.127 20.127 ↑ 3.3 23,170 3

Index Only Scan using api_upload_account_system_uuid_source_id_id_index on api_upload (cost=0.42..4,296.56 rows=76,579 width=4) (actual time=0.024..20.127 rows=23,170 loops=3)

  • Index Cond: (account = '729650'::text)
  • Heap Fetches: 2436
Planning time : 0.466 ms
Execution time : 2,537.985 ms