explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RWpn

Settings
# exclusive inclusive rows x rows loops node
1. 66.833 1,638.410 ↑ 1.7 173 1

GroupAggregate (cost=1,521,536.14..1,570,874.88 rows=288 width=12) (actual time=1,493.389..1,638.410 rows=173 loops=1)

  • Group Key: api_report.rule_id
2. 0.000 1,571.577 ↑ 1.5 264,718 1

Gather Merge (cost=1,521,536.14..1,568,928.13 rows=388,775 width=20) (actual time=1,493.372..1,571.577 rows=264,718 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 32.175 4,515.711 ↑ 1.8 88,239 3

Merge Join (cost=1,520,536.12..1,523,053.82 rows=161,990 width=20) (actual time=1,486.128..1,505.237 rows=88,239 loops=3)

  • Merge Cond: (api_report.rule_id = api_rule.id)
4. 178.110 4,481.052 ↑ 1.7 103,077 3

Sort (cost=1,520,308.89..1,520,755.36 rows=178,587 width=20) (actual time=1,485.337..1,493.684 rows=103,077 loops=3)

  • Sort Key: api_report.rule_id
  • Sort Method: external merge Disk: 3056kB
5. 38.242 4,302.942 ↑ 1.7 103,077 3

Nested Loop (cost=58,964.22..1,501,066.01 rows=178,587 width=20) (actual time=187.651..1,434.314 rows=103,077 loops=3)

6. 3,948.855 4,133.625 ↑ 3.4 8,738 3

Parallel Bitmap Heap Scan on api_upload (cost=58,951.00..446,041.68 rows=30,137 width=20) (actual time=187.598..1,377.875 rows=8,738 loops=3)

  • Recheck Cond: ((account)::text = '729650'::text)
  • Rows Removed by Index Recheck: 8631106
  • Filter: current
  • Rows Removed by Filter: 1052797
  • Heap Blocks: exact=14680 lossy=99906
7. 184.770 184.770 ↑ 1.0 3,184,605 1

Bitmap Index Scan on api_upload_account_e808b66a_like (cost=0.00..58,932.92 rows=3,190,980 width=0) (actual time=184.770..184.770 rows=3,184,605 loops=1)

  • Index Cond: ((account)::text = '729650'::text)
8. 131.054 131.075 ↑ 23.8 12 26,215

Index Only Scan using api_report_upload_id_rule_id_1a55a613_uniq on api_report (cost=13.22..32.16 rows=285 width=8) (actual time=0.004..0.005 rows=12 loops=26,215)

  • Index Cond: (upload_id = api_upload.id)
  • Filter: (NOT (hashed SubPlan 1))
  • Heap Fetches: 0
9.          

SubPlan (forIndex Only Scan)

10. 0.000 0.021 ↓ 0.0 0 3

Bitmap Heap Scan on api_ack u0 (cost=4.18..12.64 rows=4 width=4) (actual time=0.007..0.007 rows=0 loops=3)

  • Recheck Cond: ((account)::text = '729650'::text)
11. 0.021 0.021 ↓ 0.0 0 3

Bitmap Index Scan on api_ack_account_0fd242e7_like (cost=0.00..4.18 rows=4 width=0) (actual time=0.007..0.007 rows=0 loops=3)

  • Index Cond: ((account)::text = '729650'::text)
12. 0.390 2.484 ↑ 1.0 975 3

Sort (cost=227.22..229.66 rows=976 width=4) (actual time=0.788..0.828 rows=975 loops=3)

  • Sort Key: api_rule.id
  • Sort Method: quicksort Memory: 70kB
13. 2.094 2.094 ↑ 1.0 976 3

Seq Scan on api_rule (cost=0.00..178.76 rows=976 width=4) (actual time=0.016..0.698 rows=976 loops=3)

  • Filter: active
  • Rows Removed by Filter: 100