explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Diou

Settings
# exclusive inclusive rows x rows loops node
1. 32.194 267,735.098 ↑ 1.0 1 1

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

2. 3,039.414 267,702.904 ↑ 53.9 289,889 1

Unique (cost=10,479,292.20..10,596,552.00 rows=15,634,640 width=24) (actual time=258,743.219..267,702.904 rows=289,889 loops=1)

3. 39,361.205 264,663.490 ↓ 1.5 23,554,050 1

Sort (cost=10,479,292.20..10,518,378.80 rows=15,634,640 width=24) (actual time=258,743.217..264,663.490 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,030.806 225,302.285 ↓ 1.5 23,554,050 1

Gather (cost=170,584.16..7,969,820.09 rows=15,634,640 width=24) (actual time=9,266.446..225,302.285 rows=23,554,050 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 3,302.910 219,271.479 ↓ 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=9,252.758..219,271.479 rows=7,851,350 loops=3)

  • Hash Cond: (all_reports.rule_id = api_rule.id)
6. 73,103.904 215,966.044 ↓ 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=9,249.738..215,966.044 rows=11,846,603 loops=3)

  • Hash Cond: (all_reports.upload_id = api_upload.id)
7. 141,178.225 141,178.558 ↓ 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.487..141,178.558 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.333 0.333 ↑ 1.0 355 3 / 3

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

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

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

  • Buckets: 131,072 Batches: 64 Memory Usage: 2,650kB
11. 1,064.272 1,064.272 ↓ 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.837..1,064.272 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.294 2.525 ↑ 1.0 985 3 / 3

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

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

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

  • Filter: active
  • Rows Removed by Filter: 91
Planning time : 7.556 ms
Execution time : 267,846.230 ms