explain.depesz.com

PostgreSQL's explain analyze made readable

Result: V2fG

Settings
# exclusive inclusive rows x rows loops node
1. 60.395 257.635 ↑ 5.2 66 1

GroupAggregate (cost=134,224.89..135,048.73 rows=340 width=12) (actual time=175.460..257.635 rows=66 loops=1)

  • Group Key: api_rule.id
2. 88.609 197.240 ↓ 1.4 149,263 1

Sort (cost=134,224.89..134,498.37 rows=109,392 width=20) (actual time=175.441..197.240 rows=149,263 loops=1)

  • Sort Key: api_rule.id
  • Sort Method: external merge Disk: 4392kB
3. 0.000 108.631 ↓ 1.4 149,263 1

Gather (cost=1,180.34..122,825.75 rows=109,392 width=20) (actual time=1.455..108.631 rows=149,263 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 21.177 115.286 ↓ 1.1 49,754 3

Hash Join (cost=180.34..110,886.55 rows=45,580 width=20) (actual time=1.220..115.286 rows=49,754 loops=3)

  • Hash Cond: (api_report.rule_id = api_rule.id)
5. 47.461 92.989 ↑ 1.3 96,486 3

Nested Loop (cost=0.43..110,379.99 rows=123,870 width=20) (actual time=0.062..92.989 rows=96,486 loops=3)

6. 45.524 45.524 ↑ 1.3 6,878 3

Parallel Seq Scan on api_upload (cost=0.00..15,096.86 rows=8,634 width=20) (actual time=0.036..45.524 rows=6,878 loops=3)

  • Filter: (current AND ((account)::text = '729650'::text))
  • Rows Removed by Filter: 317401
7. 0.004 0.004 ↑ 19.4 14 20,634

Index Only Scan using api_report_upload_id_rule_id_1a55a613_uniq on api_report (cost=0.43..8.33 rows=271 width=8) (actual time=0.003..0.004 rows=14 loops=20,634)

  • Index Cond: (upload_id = api_upload.id)
  • Heap Fetches: 0
8. 0.095 1.120 ↑ 1.0 337 3

Hash (cost=175.66..175.66 rows=340 width=4) (actual time=1.120..1.120 rows=337 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
9. 0.854 1.025 ↑ 1.0 337 3

Seq Scan on api_rule (cost=17.11..175.66 rows=340 width=4) (actual time=0.297..1.025 rows=337 loops=3)

  • Filter: (active AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 587
10.          

SubPlan (forSeq Scan)

11. 0.171 0.171 ↑ 1.0 353 3

Seq Scan on api_ack (cost=0.00..16.23 rows=353 width=4) (actual time=0.025..0.171 rows=353 loops=3)

  • Filter: ((account)::text = '729650'::text)
  • Rows Removed by Filter: 385
Planning time : 0.550 ms
Execution time : 258.571 ms