explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2cq1

Settings
# exclusive inclusive rows x rows loops node
1. 3,050.340 4,832.049 ↓ 1.4 11,398,015 1

Nested Loop Left Join (cost=6,275.57..118,222.88 rows=8,258,636 width=40) (actual time=57.618..4,832.049 rows=11,398,015 loops=1)

2. 22.087 129.072 ↓ 1.1 78,697 1

Hash Left Join (cost=6,275.29..12,120.28 rows=71,166 width=26) (actual time=57.602..129.072 rows=78,697 loops=1)

  • Hash Cond: (uam.addressid = addr.addressid)
3. 35.445 62.546 ↓ 1.1 78,697 1

Hash Right Join (cost=1,650.30..7,308.48 rows=71,166 width=8) (actual time=12.679..62.546 rows=78,697 loops=1)

  • Hash Cond: (uam.userid = gu.userid)
4. 14.488 14.488 ↓ 1.0 197,027 1

Seq Scan on useraddressmappings uam (cost=0.00..3,223.81 rows=196,881 width=8) (actual time=0.007..14.488 rows=197,027 loops=1)

5. 4.813 12.613 ↑ 1.0 36,789 1

Hash (cost=1,190.44..1,190.44 rows=36,789 width=8) (actual time=12.613..12.613 rows=36,789 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1950kB
6. 7.800 7.800 ↑ 1.0 36,789 1

Index Scan using groups_users_groupid_idx on groups_users gu (cost=0.29..1,190.44 rows=36,789 width=8) (actual time=0.018..7.800 rows=36,789 loops=1)

  • Index Cond: (groupid = ANY ('{955,964,874}'::integer[]))
7. 25.802 44.439 ↓ 1.0 156,134 1

Hash (cost=2,673.33..2,673.33 rows=156,133 width=26) (actual time=44.439..44.439 rows=156,134 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 11157kB
8. 18.637 18.637 ↓ 1.0 156,134 1

Seq Scan on addresses addr (cost=0.00..2,673.33 rows=156,133 width=26) (actual time=0.007..18.637 rows=156,134 loops=1)

9. 1,652.637 1,652.637 ↓ 6.3 145 78,697

Index Scan using acls_group_id_key on acls a (cost=0.28..0.68 rows=23 width=12) (actual time=0.003..0.021 rows=145 loops=78,697)

  • Index Cond: (gu.groupid = group_id)