explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QXr

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 2.267 ↑ 24.6 24 1

HashAggregate (cost=627.27..633.18 rows=591 width=11) (actual time=2.263..2.267 rows=24 loops=1)

  • Group Key: u1.username
2. 0.005 2.242 ↑ 24.6 24 1

Nested Loop (cost=45.00..625.79 rows=591 width=11) (actual time=2.196..2.242 rows=24 loops=1)

3. 0.024 0.024 ↑ 1.0 1 1

Index Scan using user_pkey on "user" u2 (cost=0.41..2.43 rows=1 width=230) (actual time=0.023..0.024 rows=1 loops=1)

  • Index Cond: (id = 2)
4. 0.056 2.213 ↑ 24.6 24 1

Bitmap Heap Scan on "user" u1 (cost=44.58..617.45 rows=591 width=241) (actual time=2.171..2.213 rows=24 loops=1)

  • Recheck Cond: (known_ips && u2.known_ips)
  • Filter: (id <> u2.id)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=26
5. 2.157 2.157 ↑ 22.7 26 1

Bitmap Index Scan on idx_user__ips (cost=0.00..44.43 rows=591 width=0) (actual time=2.157..2.157 rows=26 loops=1)

  • Index Cond: (known_ips && u2.known_ips)
Planning time : 0.237 ms
Execution time : 2.354 ms