explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ks8X

Settings
# exclusive inclusive rows x rows loops node
1. 1,089.659 2,886.175 ↓ 1.5 2,220,713 1

Hash Join (cost=1,227.35..78,577.59 rows=1,448,441 width=8) (actual time=11.424..2,886.175 rows=2,220,713 loops=1)

  • Hash Cond: (t.user_id = users.id)
2. 1,235.668 1,796.367 ↓ 1.4 2,220,713 1

Hash Join (cost=1,208.36..57,936.74 rows=1,636,657 width=8) (actual time=11.269..1,796.367 rows=2,220,713 loops=1)

  • Hash Cond: (t.device_id = devices.id)
3. 549.465 549.465 ↑ 1.0 2,220,713 1

Seq Scan on tmp_user_device t (cost=0.00..32,034.13 rows=2,220,713 width=8) (actual time=0.011..549.465 rows=2,220,713 loops=1)

4. 4.353 11.234 ↑ 1.0 14,608 1

Hash (cost=1,025.76..1,025.76 rows=14,608 width=4) (actual time=11.234..11.234 rows=14,608 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 642kB
5. 6.881 6.881 ↑ 1.0 14,608 1

Seq Scan on devices (cost=0.00..1,025.76 rows=14,608 width=4) (actual time=0.006..6.881 rows=14,608 loops=1)

  • Filter: (activation_status < 9999)
  • Rows Removed by Filter: 5213
6. 0.048 0.149 ↑ 1.0 177 1

Hash (cost=16.77..16.77 rows=177 width=4) (actual time=0.149..0.149 rows=177 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
7. 0.101 0.101 ↑ 1.0 177 1

Seq Scan on users (cost=0.00..16.77 rows=177 width=4) (actual time=0.006..0.101 rows=177 loops=1)

  • Filter: (is_active AND is_admin)