explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sEP

Settings
# exclusive inclusive rows x rows loops node
1. 9,578.306 12,437.733 ↑ 1.0 1 1

Aggregate (cost=4,701,163.57..4,701,163.58 rows=1 width=8) (actual time=12,437.733..12,437.733 rows=1 loops=1)

2. 0.000 2,859.427 ↓ 1.2 1,655,985 1

Gather (cost=57,351.63..4,697,681.08 rows=1,392,995 width=20) (actual time=301.660..2,859.427 rows=1,655,985 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 254.064 3,182.236 ↑ 1.1 551,995 3

Hash Join (cost=56,351.63..4,557,381.58 rows=580,415 width=20) (actual time=297.770..3,182.236 rows=551,995 loops=3)

  • Hash Cond: (api_report.rule_id = api_rule.id)
4. 1,044.112 2,927.005 ↓ 1.4 933,541 3

Nested Loop (cost=56,161.37..4,555,487.82 rows=646,343 width=20) (actual time=296.546..2,927.005 rows=933,541 loops=3)

5. 1,595.321 1,882.883 ↑ 1.4 81,855 3

Parallel Bitmap Heap Scan on api_upload (cost=56,142.95..377,619.63 rows=111,372 width=20) (actual time=296.235..1,882.883 rows=81,855 loops=3)

  • Recheck Cond: ((account)::text = '729650'::text)
  • Rows Removed by Index Recheck: 6698321
  • Filter: ((checked_on >= '2019-07-15 00:00:00+00'::timestamp with time zone) AND (checked_on <= '2019-08-01 23:59:59+00'::timestamp with time zone))
  • Rows Removed by Filter: 807003
  • Heap Blocks: exact=14993 lossy=62992
6. 287.562 287.562 ↓ 1.0 2,666,576 1

Bitmap Index Scan on api_upload_account_e808b66a_like (cost=0.00..56,076.12 rows=2,601,008 width=0) (actual time=287.562..287.562 rows=2,666,576 loops=1)

  • Index Cond: ((account)::text = '729650'::text)
7. 0.000 0.010 ↑ 21.8 11 245,566

Index Only Scan using api_report_upload_id_rule_id_1a55a613_uniq on api_report (cost=18.42..35.11 rows=240 width=8) (actual time=0.006..0.010 rows=11 loops=245,566)

  • Index Cond: (upload_id = api_upload.id)
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 1
  • Heap Fetches: 0
8.          

SubPlan (for Index Only Scan)

9. 0.152 0.152 ↑ 1.0 355 3

Seq Scan on api_ack u0 (cost=0.00..16.96 rows=355 width=4) (actual time=0.015..0.152 rows=355 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 442
10. 0.282 1.167 ↑ 1.0 942 3

Hash (cost=178.49..178.49 rows=942 width=4) (actual time=1.167..1.167 rows=942 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
11. 0.885 0.885 ↑ 1.0 942 3

Seq Scan on api_rule (cost=0.00..178.49 rows=942 width=4) (actual time=0.019..0.885 rows=942 loops=3)

  • Filter: active
  • Rows Removed by Filter: 107
Planning time : 1.400 ms
Execution time : 12,441.120 ms