explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MMK

Settings
# exclusive inclusive rows x rows loops node
1. 45.850 285,422.864 ↑ 1.0 1 1

Aggregate (cost=10,791,985.00..10,791,985.01 rows=1 width=8) (actual time=285,422.864..285,422.864 rows=1 loops=1)

2. 3,123.107 285,377.014 ↑ 53.9 289,889 1

Unique (cost=10,479,292.20..10,596,552.00 rows=15,634,640 width=24) (actual time=276,119.943..285,377.014 rows=289,889 loops=1)

3. 45,266.844 282,253.907 ↓ 1.5 23,554,050 1

Sort (cost=10,479,292.20..10,518,378.80 rows=15,634,640 width=24) (actual time=276,119.942..282,253.907 rows=23,554,050 loops=1)

  • Sort Key: all_reports.system_uuid, all_reports.rule_id
  • Sort Method: external merge Disk: 691,448kB
4. 6,262.442 236,987.063 ↓ 1.5 23,554,050 1

Gather (cost=170,584.16..7,969,820.09 rows=15,634,640 width=24) (actual time=2,433.283..236,987.063 rows=23,554,050 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 3,836.155 230,724.621 ↓ 1.2 7,851,350 3 / 3

Hash Join (cost=169,584.16..6,405,356.09 rows=6,514,433 width=24) (actual time=2,428.225..230,724.621 rows=7,851,350 loops=3)

  • Hash Cond: (all_reports.rule_id = api_rule.id)
6. 73,770.278 226,887.361 ↓ 1.7 11,846,603 3 / 3

Hash Join (cost=169,391.96..6,386,401.18 rows=7,119,815 width=20) (actual time=2,427.072..226,887.361 rows=11,846,603 loops=3)

  • Hash Cond: (all_reports.upload_id = api_upload.id)
7. 151,336.720 151,336.940 ↓ 1.5 129,520,681 3 / 3

Parallel Seq Scan on all_reports (cost=18.28..4,932,629.78 rows=88,758,740 width=24) (actual time=0.352..151,336.940 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.220 0.220 ↑ 1.0 355 3 / 3

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

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

Hash (cost=122,065.00..122,065.00 rows=2,883,575 width=4) (actual time=1,780.143..1,780.143 rows=2,957,415 loops=3)

  • Buckets: 131,072 Batches: 64 Memory Usage: 2,650kB
11. 1,112.395 1,112.395 ↓ 1.0 2,957,415 3 / 3

Index Only Scan using api_upload_account_checked_on_id_index on api_upload (cost=0.56..122,065.00 rows=2,883,575 width=4) (actual time=0.241..1,112.395 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.259 1.105 ↑ 1.0 985 3 / 3

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

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

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

  • Filter: active
  • Rows Removed by Filter: 91
Planning time : 1.054 ms
Execution time : 285,549.005 ms