explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W9Xm

Settings
# exclusive inclusive rows x rows loops node
1. 48.008 273,570.630 ↑ 1.0 1 1

Aggregate (cost=11,604,714.06..11,604,714.07 rows=1 width=8) (actual time=273,570.630..273,570.630 rows=1 loops=1)

2. 3,472.876 273,522.622 ↑ 53.9 289,889 1

Unique (cost=11,292,021.28..11,409,281.08 rows=15,634,639 width=60) (actual time=264,027.116..273,522.622 rows=289,889 loops=1)

3. 43,666.150 270,049.746 ↓ 1.5 23,554,050 1

Sort (cost=11,292,021.28..11,331,107.88 rows=15,634,639 width=60) (actual time=264,027.115..270,049.746 rows=23,554,050 loops=1)

  • Sort Key: api_upload.system_uuid, api_report.rule_id
  • Sort Method: external merge Disk: 691,448kB
4. 9,223.862 226,383.596 ↓ 1.5 23,554,050 1

Gather (cost=202,180.16..7,660,333.81 rows=15,634,639 width=60) (actual time=2,121.386..226,383.596 rows=23,554,050 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 4,344.890 217,159.734 ↓ 1.2 7,851,350 3 / 3

Hash Join (cost=201,180.16..6,095,869.91 rows=6,514,433 width=60) (actual time=2,113.011..217,159.734 rows=7,851,350 loops=3)

  • Hash Cond: (api_report.rule_id = api_rule.id)
6. 72,521.174 212,813.580 ↓ 1.7 11,846,603 3 / 3

Hash Join (cost=200,987.96..6,076,914.99 rows=7,119,815 width=20) (actual time=2,111.644..212,813.580 rows=11,846,603 loops=3)

  • Hash Cond: (api_report.upload_id = api_upload.id)
7. 138,182.775 138,183.058 ↓ 1.5 129,520,681 3 / 3

Parallel Seq Scan on api_report (cost=18.28..4,932,629.61 rows=88,758,733 width=8) (actual time=0.440..138,183.058 rows=129,520,681 loops=3)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 12,493,292
8.          

SubPlan (for Parallel Seq Scan)

9. 0.283 0.283 ↑ 1.0 355 3 / 3

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

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 477
10. 783.792 2,109.348 ↓ 1.0 2,957,415 3 / 3

Hash (cost=148,029.00..148,029.00 rows=2,883,575 width=20) (actual time=2,109.348..2,109.348 rows=2,957,415 loops=3)

  • Buckets: 65,536 Batches: 64 Memory Usage: 2,860kB
11. 1,325.556 1,325.556 ↓ 1.0 2,957,415 3 / 3

Index Only Scan using api_upload_account_checked_on_id_sys_index on api_upload (cost=0.56..148,029.00 rows=2,883,575 width=20) (actual time=0.285..1,325.556 rows=2,957,415 loops=3)

  • Index Cond: ((account = '729650'::text) AND (checked_on >= '2019-02-27 00:00:00+00'::timestamp with time zone) AND (checked_on <= '2019-08-26 23:59:59+00'::timestamp with time zone))
  • Heap Fetches: 0
12. 0.326 1.264 ↑ 1.0 985 3 / 3

Hash (cost=179.82..179.82 rows=990 width=4) (actual time=1.263..1.264 rows=985 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 43kB
13. 0.938 0.938 ↑ 1.0 985 3 / 3

Seq Scan on api_rule (cost=0.00..179.82 rows=990 width=4) (actual time=0.026..0.938 rows=985 loops=3)

  • Filter: active
  • Rows Removed by Filter: 91
Planning time : 1.285 ms
Execution time : 273,692.714 ms