explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2X9T

Settings
# exclusive inclusive rows x rows loops node
1. 1.081 24.274 ↓ 1.4 1,680 1

Hash Join (cost=1,067.04..2,357.94 rows=1,197 width=169) (actual time=10.869..24.274 rows=1,680 loops=1)

  • Hash Cond: (uta.product_id = prod.id)
2. 2.309 23.170 ↓ 1.4 1,680 1

Nested Loop (cost=1,064.68..2,351.60 rows=1,197 width=169) (actual time=10.820..23.170 rows=1,680 loops=1)

3. 5.482 19.215 ↓ 1.2 1,646 1

Hash Join (cost=1,064.40..1,874.48 rows=1,399 width=185) (actual time=10.775..19.215 rows=1,646 loops=1)

  • Hash Cond: (up.user_id = uta.user_id)
4. 3.185 3.185 ↑ 1.1 9,891 1

Seq Scan on user_property_value_flat up (cost=0.00..752.12 rows=11,212 width=24) (actual time=0.003..3.185 rows=9,891 loops=1)

5. 1.023 10.548 ↓ 1.0 1,646 1

Hash (cost=1,044.50..1,044.50 rows=1,592 width=161) (actual time=10.548..10.548 rows=1,646 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 367kB
6. 3.028 9.525 ↓ 1.0 1,646 1

Hash Join (cost=557.12..1,044.50 rows=1,592 width=161) (actual time=2.176..9.525 rows=1,646 loops=1)

  • Hash Cond: (usr.id = uta.user_id)
7. 4.342 4.342 ↓ 1.0 9,337 1

Seq Scan on users usr (cost=0.00..436.57 rows=9,305 width=30) (actual time=0.004..4.342 rows=9,337 loops=1)

  • Filter: (NOT testuser)
  • Rows Removed by Filter: 554
8. 0.708 2.155 ↑ 1.0 1,686 1

Hash (cost=536.04..536.04 rows=1,686 width=131) (actual time=2.154..2.155 rows=1,686 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 319kB
9. 1.447 1.447 ↑ 1.0 1,686 1

Seq Scan on user_to_access uta (cost=0.00..536.04 rows=1,686 width=131) (actual time=0.015..1.447 rows=1,686 loops=1)

  • Filter: activated
  • Rows Removed by Filter: 5518
10. 1.646 1.646 ↑ 1.0 1 1,646

Index Only Scan using idx_account_users_user_id on account_users au (cost=0.29..0.33 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,646)

  • Index Cond: (user_id = up.user_id)
  • Heap Fetches: 0
11. 0.009 0.023 ↑ 1.0 16 1

Hash (cost=2.16..2.16 rows=16 width=8) (actual time=0.023..0.023 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.014 0.014 ↑ 1.0 16 1

Seq Scan on product prod (cost=0.00..2.16 rows=16 width=8) (actual time=0.006..0.014 rows=16 loops=1)

Planning time : 1.968 ms
Execution time : 24.751 ms