explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cnjw

Settings
# exclusive inclusive rows x rows loops node
1. 1.339 22.239 ↑ 2.2 833 1

Nested Loop (cost=758.21..7,658.77 rows=1,793 width=4) (actual time=8.354..22.239 rows=833 loops=1)

2. 1.199 8.900 ↑ 1.0 2,000 1

HashAggregate (cost=757.77..777.77 rows=2,000 width=4) (actual time=8.327..8.900 rows=2,000 loops=1)

  • Group Key: members_1.id
3. 0.226 7.701 ↑ 1.0 2,000 1

Append (cost=0.44..752.77 rows=2,000 width=4) (actual time=0.024..7.701 rows=2,000 loops=1)

4. 0.081 5.017 ↑ 1.0 1,000 1

Limit (cost=0.44..283.37 rows=1,000 width=4) (actual time=0.023..5.017 rows=1,000 loops=1)

5. 4.936 4.936 ↑ 978.5 1,000 1

Index Scan using index_members_on_user_id on members members_1 (cost=0.44..276,851.12 rows=978,507 width=4) (actual time=0.023..4.936 rows=1,000 loops=1)

  • Index Cond: (user_id IS NULL)
6. 0.079 2.458 ↑ 1.0 1,000 1

Limit (cost=0.56..439.40 rows=1,000 width=4) (actual time=0.026..2.458 rows=1,000 loops=1)

7. 2.379 2.379 ↑ 984.4 1,000 1

Index Scan using index_members_on_invite_token on members members_2 (cost=0.56..432,014.86 rows=984,447 width=4) (actual time=0.025..2.379 rows=1,000 loops=1)

  • Index Cond: (invite_token IS NOT NULL)
8. 12.000 12.000 ↓ 0.0 0 2,000

Index Scan using members_pkey on members (cost=0.44..3.43 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=2,000)

  • Index Cond: (id = members_1.id)
  • Filter: (created_at <= '2020-06-17 11:09:02.593574'::timestamp without time zone)
  • Rows Removed by Filter: 1
Planning time : 0.232 ms
Execution time : 22.356 ms