explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OA3b

Settings
# exclusive inclusive rows x rows loops node
1. 1,110.725 2,878.831 ↓ 2.3 2,220,713 1

Hash Join (cost=1,211.76..63,979.26 rows=956,658 width=8) (actual time=11.596..2,878.831 rows=2,220,713 loops=1)

  • Hash Cond: (t.user_id = users.id)
2. 1,208.886 1,767.942 ↓ 2.1 2,220,713 1

Hash Semi Join (cost=1,188.78..50,336.06 rows=1,080,970 width=8) (actual time=11.425..1,767.942 rows=2,220,713 loops=1)

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

Seq Scan on tmp_user_device t (cost=0.00..31,446.40 rows=2,161,940 width=8) (actual time=0.013..547.671 rows=2,220,713 loops=1)

4. 4.324 11.385 ↓ 1.0 14,608 1

Hash (cost=1,014.49..1,014.49 rows=13,943 width=4) (actual time=11.385..11.385 rows=14,608 loops=1)

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

Seq Scan on devices (cost=0.00..1,014.49 rows=13,943 width=4) (actual time=0.006..7.061 rows=14,608 loops=1)

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

Hash (cost=20.77..20.77 rows=177 width=4) (actual time=0.164..0.164 rows=177 loops=1)

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

Seq Scan on users (cost=0.00..20.77 rows=177 width=4) (actual time=0.009..0.109 rows=177 loops=1)

  • Filter: (is_active AND is_admin)